From 8ba3ab0add8a97663b47b127254220d9dad5785e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 31 Jan 2023 21:08:48 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/7206 --- app/src/menus/protyle.ts | 2 +- app/src/protyle/util/paste.ts | 4 ++-- app/src/protyle/wysiwyg/keydown.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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();