diff --git a/app/src/block/util.ts b/app/src/block/util.ts index 9178685a9..08043c275 100644 --- a/app/src/block/util.ts +++ b/app/src/block/util.ts @@ -63,14 +63,14 @@ export const genSBElement = (layout: string, id?: string, attrHTML?: string) => export const jumpToParentNext = (protyle:IProtyle,nodeElement: Element) => { const topElement = getTopAloneElement(nodeElement); if (topElement) { - const topParentElement = hasClosestByClassName(topElement, "list") || hasClosestByClassName(topElement, "bq") || hasClosestByClassName(topElement, "sb") || topElement - const nextElement = getNextBlock(topParentElement) + const topParentElement = hasClosestByClassName(topElement, "list") || hasClosestByClassName(topElement, "bq") || hasClosestByClassName(topElement, "sb") || topElement; + const nextElement = getNextBlock(topParentElement); if (nextElement) { - focusBlock(nextElement) + focusBlock(nextElement); scrollCenter(protyle, nextElement); } } -} +}; export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id?: string) => { const range = getEditorRange(protyle.wysiwyg.element); diff --git a/app/src/protyle/breadcrumb/action.ts b/app/src/protyle/breadcrumb/action.ts index 50d447545..b05398f0b 100644 --- a/app/src/protyle/breadcrumb/action.ts +++ b/app/src/protyle/breadcrumb/action.ts @@ -36,7 +36,7 @@ export const netImg2LocalAssets = (protyle: IProtyle) => { }); /// #endif }); -} +}; export const fullscreen = (element: Element, btnElement?: Element) => { const isFullscreen = element.className.includes("fullscreen"); diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 64b424149..b78582b19 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -219,7 +219,7 @@ export class Breadcrumb { icon: "iconTransform", accelerator: window.siyuan.config.keymap.editor.general.netImg2LocalAsset.custom, click () { - netImg2LocalAssets(protyle) + netImg2LocalAssets(protyle); } }).element); window.siyuan.menus.menu.append(new MenuItem({ diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index a6d4af8a9..34d1cdb40 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -1099,7 +1099,7 @@ export class Gutter { accelerator: window.siyuan.config.keymap.editor.general.jumpToParentNext.custom, click() { nodeElement.classList.remove("protyle-wysiwyg--select"); - jumpToParentNext(protyle, nodeElement) + jumpToParentNext(protyle, nodeElement); } }).element); window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element); diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts index 38a086be9..69fdc168c 100644 --- a/app/src/protyle/wysiwyg/commonHotkey.ts +++ b/app/src/protyle/wysiwyg/commonHotkey.ts @@ -43,7 +43,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent) => { return true; } if (matchHotKey(window.siyuan.config.keymap.editor.general.netImg2LocalAsset.custom, event)) { - netImg2LocalAssets(protyle) + netImg2LocalAssets(protyle); event.preventDefault(); event.stopPropagation(); return; diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 99fce3299..bd01bb40b 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -226,7 +226,7 @@ export class WYSIWYG { } else { const tempElement = document.createElement("div"); // https://github.com/siyuan-note/siyuan/issues/5540 - const selectTypes = protyle.toolbar.getCurrentType(range) + const selectTypes = protyle.toolbar.getCurrentType(range); if ((selectTypes.length === 1 || range.startContainer.parentElement.parentElement.getAttribute("data-type") === "NodeHeading") && ( (range.startContainer.nodeType === 3 && range.startContainer.parentElement.textContent === range.toString()) || diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index e21e26e8a..909a775cc 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1190,7 +1190,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return true; } if (matchHotKey(window.siyuan.config.keymap.editor.general.jumpToParentNext.custom, event)) { - jumpToParentNext(protyle, nodeElement) + jumpToParentNext(protyle, nodeElement); event.preventDefault(); event.stopPropagation(); return true; diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 3c0bff3b5..c21ea1a5d 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -381,7 +381,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b if (operation.previousID) { let beforeElement: Element; Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.previousID}"]`)).find(item => { - const embedElement = hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed") + const embedElement = hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed"); if (embedElement) { // https://github.com/siyuan-note/siyuan/issues/5524 embedElement.removeAttribute("data-render");