mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-11 01:34:20 +01:00
🎨 global search https://github.com/siyuan-note/siyuan/issues/3171
This commit is contained in:
parent
ac02cebfa6
commit
9e7ed1477b
2 changed files with 7 additions and 3 deletions
|
|
@ -180,10 +180,10 @@ class Protyle {
|
|||
});
|
||||
}
|
||||
});
|
||||
if (mergedOptions.after) {
|
||||
mergedOptions.after(this);
|
||||
}
|
||||
});
|
||||
if (mergedOptions.after) {
|
||||
mergedOptions.after(this);
|
||||
}
|
||||
}
|
||||
|
||||
public reload() {
|
||||
|
|
|
|||
|
|
@ -663,6 +663,9 @@ const getArticle = (options: {
|
|||
gutter: true,
|
||||
breadcrumbDocName: true
|
||||
},
|
||||
after: (protyle) => {
|
||||
protyle.protyle.wysiwyg.element.querySelector(`div[data-node-id="${options.id}"] span[data-type="search-mark"]`).scrollIntoView();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
protyle.protyle.scroll.lastScrollTop = 0;
|
||||
|
|
@ -674,6 +677,7 @@ const getArticle = (options: {
|
|||
size: options.folded ? Constants.SIZE_GET_MAX : Constants.SIZE_GET,
|
||||
}, getResponse => {
|
||||
onGet(getResponse, protyle.protyle, options.folded ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL]);
|
||||
protyle.protyle.wysiwyg.element.querySelector(`div[data-node-id="${options.id}"] span[data-type="search-mark"]`).scrollIntoView();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue