added "save search to note" button

This commit is contained in:
zadam
2021-06-06 11:01:10 +02:00
parent e48609aa68
commit c886583396
10 changed files with 93 additions and 40 deletions

View File

@@ -12,9 +12,16 @@ const utils = require('../../services/utils');
const path = require('path');
const Attribute = require('../../becca/entities/attribute.js');
const htmlSanitizer = require('../../services/html_sanitizer');
const {formatAttrForSearch} = require("../../services/attribute_formatter.js");
function findClippingNote(todayNote, pageUrl) {
const notes = todayNote.getDescendantNotesWithLabel('pageUrl', pageUrl);
const notes = todayNote.searchNoteInSubtree(
formatAttrForSearch({
type: 'label',
name: "pageUrl",
value: pageUrl
}, true)
);
for (const note of notes) {
if (note.getOwnedLabelValue('clipType') === 'clippings') {