|
@@ -15,6 +15,7 @@ import {openModel} from "../mobile/menu/model";
|
|
|
import {closeModel} from "../mobile/util/closePanel";
|
|
|
import {App} from "../index";
|
|
|
import {resizeSide} from "./resizeSide";
|
|
|
+import {searchMarkRender, searchTextMarkRender} from "../protyle/render/searchMarkRender";
|
|
|
|
|
|
let historyEditor: Protyle;
|
|
|
|
|
@@ -694,12 +695,14 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {
|
|
|
} else if (type === "doc") {
|
|
|
fetchPost("/api/history/getDocHistoryContent", {
|
|
|
historyPath: dataPath,
|
|
|
+ highlight: CSS && CSS.highlights,
|
|
|
k: (firstPanelElement.querySelector(".b3-text-field") as HTMLInputElement).value
|
|
|
}, (response) => {
|
|
|
if (response.data.isLargeDoc) {
|
|
|
mdElement.value = response.data.content;
|
|
|
mdElement.classList.remove("fn__none");
|
|
|
docElement.classList.add("fn__none");
|
|
|
+ searchTextMarkRender(mdElement, []);
|
|
|
} else {
|
|
|
mdElement.classList.add("fn__none");
|
|
|
docElement.classList.remove("fn__none");
|
|
@@ -709,6 +712,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {
|
|
|
protyle: historyEditor.protyle,
|
|
|
action: [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML],
|
|
|
});
|
|
|
+ searchMarkRender(historyEditor.protyle, historyEditor.protyle.wysiwyg.element.querySelectorAll('span[data-type~="search-mark"]'));
|
|
|
}
|
|
|
});
|
|
|
}
|