This commit is contained in:
Vanessa 2022-11-08 18:53:03 +08:00
parent 6db5682a0e
commit 8a4d4ab3c9
3 changed files with 30 additions and 9 deletions

View file

@ -23,13 +23,10 @@ import {readText, writeText} from "../protyle/util/compatibility";
import {preventScroll} from "../protyle/scroll/preventScroll";
import {onGet} from "../protyle/util/onGet";
import {getAllModels} from "../layout/getAll";
import {pasteText} from "../protyle/util/paste";
import {pasteAsPlainText, pasteText} from "../protyle/util/paste";
/// #if !MOBILE
import {openFileById, updateBacklinkGraph} from "../editor/util";
/// #endif
/// #if !BROWSER
import {getCurrentWindow} from "@electron/remote";
/// #endif
import {isMobile} from "../util/functions";
import {removeFoldHeading} from "../protyle/util/heading";
import {lineNumberRender} from "../protyle/markdown/highlightRender";
@ -364,7 +361,7 @@ export const contentMenu = (protyle: IProtyle, nodeElement: Element) => {
accelerator: "⇧⌘V",
click() {
focusByRange(getEditorRange(nodeElement));
getCurrentWindow().webContents.pasteAndMatchStyle();
pasteAsPlainText(protyle);
}
}).element);
/// #endif