Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/9259

Vanessa9463185acfce
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 1d885eefef..c96ce60104 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 faf41962ea..44ddae95be 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");