Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/7706

Vanessafb4db3d745e4
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 5d9c43a508..54041b6100 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -1448,7 +1448,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
selectsElement.push(nodeElement);
}
selectsElement.forEach(item => {
- item.querySelectorAll('[contenteditable="true"]').forEach(editItem => {
+ // 不能使用 [contenteditable="true"], 否则嵌入块无法复制
+ item.querySelectorAll("[spellcheck]").forEach(editItem => {
const cloneNode = editItem.cloneNode(true) as HTMLElement;
cloneNode.querySelectorAll('[data-type="backslash"]').forEach(slashItem => {
slashItem.firstElementChild.remove();