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

Vanessa91f3ff61c8c8
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts
index 323078352c..d8be7a82e4 100644
--- a/app/src/protyle/header/Title.ts
+++ b/app/src/protyle/header/Title.ts
@@ -154,7 +154,9 @@ export class Title {
event.preventDefault();
event.stopPropagation();
} else if (matchHotKey(window.siyuan.config.keymap.editor.general.copyBlockRef.custom, event)) {
- writeText(`((${protyle.block.rootID} '${this.editElement.textContent.replace(/'/g, "'")}'))`);
+ fetchPost("/api/block/getRefText", {id: protyle.block.rootID}, (response) => {
+ writeText(`((${protyle.block.rootID} '${response.data}'))`);
+ });
event.preventDefault();
event.stopPropagation();
} else if (matchHotKey(window.siyuan.config.keymap.editor.general.copyID.custom, event)) {