Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/6031

Vanessa5853a077fd8e
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 0a49d1cf35..76fb6be4d6 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 {