diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index e7e63e056..d7fb6df3a 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -158,7 +158,7 @@ export const setRefDynamicText = (data: { }) => { getAllEditor().forEach(item => { // 不能对比 rootId,否则嵌入块中的锚文本无法更新 - item.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${data.blockID}"] span[data-type="block-ref"][data-subtype="d"][data-id="${data.defBlockID}"]`).forEach(item => { + item.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${data.blockID}"] span[data-type~="block-ref"][data-subtype="d"][data-id="${data.defBlockID}"]`).forEach(item => { item.innerHTML = data.refText; }); }); diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index b1f97b09f..c7cd1b29b 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -239,7 +239,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: focusBlock(blockElement); } else { // https://github.com/siyuan-note/siyuan/issues/6087 - realElement.querySelectorAll('[data-type="block-ref"][data-subtype="d"]').forEach(refItem => { + realElement.querySelectorAll('[data-type~="block-ref"][data-subtype="d"]').forEach(refItem => { if (refItem.textContent === "") { fetchPost("/api/block/getRefText", {id: refItem.getAttribute("data-id")}, (response) => { refItem.innerHTML = response.data;