From 82bed847e6c327cd4bbb3b5cf77e1726ebfe4fff Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 30 Sep 2023 14:40:45 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/9320 --- app/src/mobile/util/keyboardToolbar.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts index 43eeaad3b..707af3a90 100644 --- a/app/src/mobile/util/keyboardToolbar.ts +++ b/app/src/mobile/util/keyboardToolbar.ts @@ -21,10 +21,10 @@ const getSlashItem = (value: string, icon: string, text: string, focus = "false" } else { iconHTML = icon; } - return `
+ return `
`; +`; }; export const renderTextMenu = (protyle: IProtyle, toolbarElement: Element) => { @@ -500,9 +500,9 @@ export const initKeyboardToolbar = () => {
`; toolbarElement.addEventListener("click", (event) => { + const protyle = getCurrentEditor()?.protyle; const target = event.target as HTMLElement; const slashBtnElement = hasClosestByClassName(event.target as HTMLElement, "keyboard__slash-item"); - const protyle = getCurrentEditor()?.protyle; if (slashBtnElement && !slashBtnElement.getAttribute("data-type")) { const dataValue = decodeURIComponent(slashBtnElement.getAttribute("data-value")); protyle.hint.fill(dataValue, protyle, false); // 点击后 range 会改变