From 5853a077fd8e9eea681d429fd0ef44043709baf1 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 30 Sep 2022 22:26:02 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/6031 --- app/src/protyle/wysiwyg/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 0a49d1cf3..76fb6be4d 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -251,6 +251,11 @@ export class WYSIWYG { for (let i = 0; i < attributes.length; i++) { spanElement.setAttribute(attributes[i].name, attributes[i].value); } + if (spanElement.getAttribute("data-type").indexOf("block-ref") > -1 && + spanElement.getAttribute("data-subtype") === "d") { + // 需变为静态锚文本 + spanElement.setAttribute("data-subtype", "s"); + } spanElement.textContent = range.toString(); html = spanElement.outerHTML; } else {