From 91f3ff61c8c8e10130cebd761834a6ace6505614 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 22 Apr 2023 15:09:25 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/8080 --- app/src/protyle/header/Title.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts index 323078352..d8be7a82e 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)) {