diff --git a/app/src/config/editor.ts b/app/src/config/editor.ts index faa4b85e0..cf1fe0f4f 100644 --- a/app/src/config/editor.ts +++ b/app/src/config/editor.ts @@ -202,7 +202,7 @@ export const editor = { onSetEditor: (editor: IEditor) => { window.siyuan.config.editor = editor; getAllModels().editor.forEach((item) => { - reloadProtyle(item.editor.protyle) + reloadProtyle(item.editor.protyle); setPadding(item.editor.protyle); if (window.siyuan.config.editor.fullWidth) { item.editor.protyle.contentElement.setAttribute("data-fullwidth", "true"); diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index 6847ad442..d9b460772 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -100,7 +100,7 @@ class Protyle { size: Constants.SIZE_GET, }, getResponse => { onGet(getResponse, this.protyle); - }) + }); } else { reloadProtyle(this.protyle); } diff --git a/app/src/protyle/util/reload.ts b/app/src/protyle/util/reload.ts index c7202a432..c6f3cb436 100644 --- a/app/src/protyle/util/reload.ts +++ b/app/src/protyle/util/reload.ts @@ -19,4 +19,4 @@ export const reloadProtyle = (protyle:IProtyle) => { }, getResponse => { onGet(getResponse, protyle, protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS], saveScroll(protyle, true), true); }); -} +}; diff --git a/app/src/search/spread.ts b/app/src/search/spread.ts index 826886492..b4ac0c314 100644 --- a/app/src/search/spread.ts +++ b/app/src/search/spread.ts @@ -537,7 +537,7 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: stri } getAllModels().editor.forEach(item => { if (rootIds[0] === item.editor.protyle.block.rootID) { - reloadProtyle(item.editor.protyle) + reloadProtyle(item.editor.protyle); } }); if (!currentList.nextElementSibling && searchPanelElement.children[0]) { diff --git a/app/src/util/history.ts b/app/src/util/history.ts index 65c10367a..971721257 100644 --- a/app/src/util/history.ts +++ b/app/src/util/history.ts @@ -9,7 +9,7 @@ import {renderAssetsPreview} from "../asset/renderAssets"; import Protyle from "../protyle"; import {onGet} from "../protyle/util/onGet"; -let historyEditor: Protyle +let historyEditor: Protyle; const renderDoc = (element: HTMLElement, currentPage: number) => { const previousElement = element.querySelector('[data-type="docprevious"]'); const nextElement = element.querySelector('[data-type="docnext"]'); @@ -30,12 +30,12 @@ const renderDoc = (element: HTMLElement, currentPage: number) => { docElement.classList.add("fn__none"); mdElement.classList.add("fn__none"); if (typeElement.value === "0") { - opElement.removeAttribute("disabled") - notebookElement.removeAttribute("disabled") + opElement.removeAttribute("disabled"); + notebookElement.removeAttribute("disabled"); assetElement.classList.add("fn__none"); } else { - opElement.setAttribute("disabled", "disabled") - notebookElement.setAttribute("disabled", "disabled") + opElement.setAttribute("disabled", "disabled"); + notebookElement.setAttribute("disabled", "disabled"); assetElement.classList.remove("fn__none"); } fetchPost("/api/history/searchHistory", { @@ -84,11 +84,11 @@ const renderDoc = (element: HTMLElement, currentPage: number) => { }, (contentResponse) => { if (contentResponse.data.isLargeDoc) { mdElement.value = contentResponse.data.content; - mdElement.classList.remove("fn__none") - docElement.classList.add("fn__none") + mdElement.classList.remove("fn__none"); + docElement.classList.add("fn__none"); } else { - mdElement.classList.add("fn__none") - docElement.classList.remove("fn__none") + mdElement.classList.add("fn__none"); + docElement.classList.remove("fn__none"); onGet(contentResponse, historyEditor.protyle, [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML]); } }); @@ -233,10 +233,10 @@ export const openHistory = () => { } const currentNotebookId = localStorage.getItem(Constants.LOCAL_HISTORYNOTEID); - let notebookSelectHTML = ''; + let notebookSelectHTML = ""; window.siyuan.notebooks.forEach((item) => { if (!item.closed) { - notebookSelectHTML += ` ` + notebookSelectHTML += ` `; } }); const dialog = new Dialog({ @@ -423,11 +423,11 @@ export const openHistory = () => { }, (response) => { if (response.data.isLargeDoc) { mdElement.value = response.data.content; - mdElement.classList.remove("fn__none") - docElement.classList.add("fn__none") + mdElement.classList.remove("fn__none"); + docElement.classList.add("fn__none"); } else { - mdElement.classList.add("fn__none") - docElement.classList.remove("fn__none") + mdElement.classList.add("fn__none"); + docElement.classList.remove("fn__none"); onGet(response, historyEditor.protyle, [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML]); } });