An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/13666
Vanessa68c82eaebea1
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex c97f93efde..776a2225ea 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -1514,7 +1514,8 @@ export class WYSIWYG {updateTransaction(protyle, nodeElement.getAttribute("data-node-id"), nodeElement.outerHTML, oldHTML);} else {const id = nodeElement.getAttribute("data-node-id");- const oldHTML = nodeElement.outerHTML;+ setInsertWbrHTML(nodeElement, range, protyle);+ const oldHTML = protyle.wysiwyg.lastHTMLs[id] || nodeElement.outerHTML;const tempElement = document.createElement("div");// 首次选中标题时,range.startContainer 会为空let startContainer = range.startContainer;@@ -1658,7 +1659,8 @@ export class WYSIWYG {}if (nodeElement.parentElement.parentElement && !isFoldHeading && !nodeElement.classList.contains("av")) {// 选中 heading 时,使用删除的 transaction- updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML);+ setInsertWbrHTML(nodeElement, range, protyle);+ updateTransaction(protyle, id, protyle.wysiwyg.lastHTMLs[id] || nodeElement.outerHTML, oldHTML);}}protyle.hint.render(protyle);