diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 1d885eefe..c96ce6010 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1001,8 +1001,8 @@ export class WYSIWYG { } } } + return; } - return; } if (selectElement.length > 0) { range.collapse(true); diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index faf41962e..44ddae95b 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1463,7 +1463,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (isNotEditBlock(nodeElement) && matchHotKey("⌘C", event)) { + if (matchHotKey("⌘C", event)) { let html = ""; protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => { html += removeEmbed(item); @@ -1475,7 +1475,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { } } - if (isNotEditBlock(nodeElement) && matchHotKey("⌘X", event)) { + if (matchHotKey("⌘X", event)) { let html = ""; nodeElement.classList.add("protyle-wysiwyg--select"); const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");