diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 093515704..08ef1a39b 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -365,7 +365,7 @@ export const contentMenu = (protyle: IProtyle, nodeElement: Element) => { } } }).element); - /// #if !BROWSER && !MOBILE + /// #if !BROWSER window.siyuan.menus.menu.append(new MenuItem({ label: window.siyuan.languages.pasteAsPlainText, accelerator: "⇧⌘V", diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 694c63aba..349f68d55 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -49,9 +49,9 @@ export const pasteAsPlainText = async (protyle: IProtyle) => { if (localFiles.length > 0) { uploadLocalFiles(localFiles, protyle, false); writeText(""); + } else { + getCurrentWindow().webContents.pasteAndMatchStyle(); } - /// #else - getCurrentWindow().webContents.pasteAndMatchStyle(); /// #endif }; diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 74456a6cc..969a616c9 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1620,7 +1620,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { } /// #endif - /// #if !BROWSER && !MOBILE + /// #if !BROWSER if (matchHotKey("⇧⌘V", event)) { event.returnValue = false; event.preventDefault();