Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/13909

Vanessa2a859ad52cbe
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 0bbc76ef88..290ac84d48 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -1498,7 +1498,10 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
label: window.siyuan.languages.copy,
icon: "iconCopy",
click() {
- writeText(protyle.lute.BlockDOM2StdMd(linkElement.outerHTML));
+ const range = document.createRange();
+ range.selectNode(linkElement);
+ focusByRange(range);
+ document.execCommand("copy");
}
}).element);
if (protyle.disabled) {