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)) {