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/10159

Vanessa1fac9971e9bf
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 65df6926e4..eda8c159c7 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -716,15 +716,11 @@ export class Gutter {
accelerator: "⌘C",
click() {
if (isNotEditBlock(selectsElement[0])) {
- let html = "";
- selectsElement.forEach(item => {
- html += removeEmbed(item);
- });
- writeText(protyle.lute.BlockDOM2StdMd(html).trimEnd());
+ focusBlock(selectsElement[0]);
} else {
focusByRange(getEditorRange(selectsElement[0]));
- document.execCommand("copy");
}
+ document.execCommand("copy");
}
}, {
label: window.siyuan.languages.copyPlainText,
@@ -1157,11 +1153,11 @@ export class Gutter {
accelerator: "⌘C",
click() {
if (isNotEditBlock(nodeElement)) {
- writeText(protyle.lute.BlockDOM2StdMd(removeEmbed(nodeElement)).trimEnd());
+ focusBlock(nodeElement);
} else {
focusByRange(getEditorRange(nodeElement));
- document.execCommand("copy");
}
+ document.execCommand("copy");
}
}, {
label: window.siyuan.languages.copyPlainText,