From 2a859ad52cbee8624a48d64fc9fc5608e8cb4238 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 30 Jan 2025 13:49:19 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13909 --- app/src/menus/protyle.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 0bbc76ef8..290ac84d4 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) {