diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.ts index 6e6365a6d..0721aa883 100644 --- a/app/src/boot/onGetConfig.ts +++ b/app/src/boot/onGetConfig.ts @@ -180,7 +180,7 @@ export const initWindow = () => { const winOnBlur = () => { document.body.classList.add("body--blur"); - } + }; const winOnClose = (currentWindow: Electron.BrowserWindow, close = false) => { exportLayout(false, () => { @@ -224,7 +224,7 @@ export const initWindow = () => { } else { document.getElementById("toolbar").style.paddingLeft = "0"; } - } + }; const winOnLeaveFullscreen = () => { if (isWindow()) { @@ -232,7 +232,7 @@ export const initWindow = () => { } else { document.getElementById("toolbar").setAttribute("style", ""); } - } + }; const currentWindow = getCurrentWindow(); currentWindow.on("focus", winOnFocus); diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 878a1ccdd..6ebec9717 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -205,10 +205,10 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: protyle.hint.render(protyle); } hideElements(["gutter"], protyle); - updateInput(html, protyle, id, type); + updateInput(html, protyle, id); }; -const updateInput = (html: string, protyle: IProtyle, id: string, type: string) => { +const updateInput = (html: string, protyle: IProtyle, id: string) => { const tempElement = document.createElement("template"); tempElement.innerHTML = html; const doOperations: IOperation[] = []; diff --git a/app/src/protyle/wysiwyg/turnIntoList.ts b/app/src/protyle/wysiwyg/turnIntoList.ts index a015f9309..8c4010cf1 100644 --- a/app/src/protyle/wysiwyg/turnIntoList.ts +++ b/app/src/protyle/wysiwyg/turnIntoList.ts @@ -26,15 +26,15 @@ export const turnIntoTaskList = (protyle: IProtyle, type: string, blockElement: if (isDone) { blockElement.parentElement.classList.add("protyle-task--done"); } - blockElement.previousElementSibling.outerHTML = `
` + blockElement.previousElementSibling.outerHTML = ``; editElement.innerHTML = editElement.innerHTML.substring(contextStartIndex); updateTransaction(protyle, liElement.getAttribute("data-node-id"), liElement.outerHTML, oldHTML); - focusByWbr(protyle.wysiwyg.element, range) + focusByWbr(protyle.wysiwyg.element, range); return true; } return false; } else { - const id = blockElement.getAttribute("data-node-id") + const id = blockElement.getAttribute("data-node-id"); const newId = Lute.NewNodeID(); const emptyId = Lute.NewNodeID(); const liItemId = Lute.NewNodeID(); @@ -68,18 +68,18 @@ export const turnIntoTaskList = (protyle: IProtyle, type: string, blockElement: action: "delete", id: newId }]); - blockElement.outerHTML = `