This commit is contained in:
Vanessa 2023-04-22 15:09:25 +08:00
parent f9cfc72142
commit 91f3ff61c8

View file

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