Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/14299

Vanessab3c423afc654
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index e7e63e056b..d7fb6df3ac 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 b1f97b09fb..c7cd1b29b0 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;