Vanessa 2024-12-08 11:52:44 +08:00
parent f024e3b07d
commit 6a7fb4ad61
2 changed files with 8 additions and 6 deletions

View file

@ -1,6 +1,6 @@
import {Constants} from "../../constants";
export const searchMarkRender = (protyle: IProtyle, keys: string[], isHL: boolean) => {
export const searchMarkRender = (protyle: IProtyle, keys: string[], isHL: boolean, cb?: () => void) => {
if (!isSupportCSSHL()) {
return;
}
@ -76,6 +76,9 @@ export const searchMarkRender = (protyle: IProtyle, keys: string[], isHL: boolea
if (isHL) {
CSS.highlights.set("search-mark-hl-" + protyle.highlight.styleElement.dataset.uuid, protyle.highlight.markHL);
}
if (cb) {
cb();
}
}, protyle.wysiwyg.element.querySelector(".hljs") ? Constants.TIMEOUT_TRANSITION : 0);
};