Explorar o código

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

Vanessa %!s(int64=2) %!d(string=hai) anos
pai
achega
5853a077fd
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      app/src/protyle/wysiwyg/index.ts

+ 5 - 0
app/src/protyle/wysiwyg/index.ts

@@ -251,6 +251,11 @@ export class WYSIWYG {
                     for (let i = 0; i < attributes.length; i++) {
                     for (let i = 0; i < attributes.length; i++) {
                         spanElement.setAttribute(attributes[i].name, attributes[i].value);
                         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();
                     spanElement.textContent = range.toString();
                     html = spanElement.outerHTML;
                     html = spanElement.outerHTML;
                 } else {
                 } else {