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/16113
Vanessae551cb4a4c2e
diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.tsindex 7944a67d30..a3eb9d5adf 100644--- a/app/src/protyle/util/insertHTML.ts+++ b/app/src/protyle/util/insertHTML.ts@@ -21,6 +21,7 @@ import {fetchPost} from "../../util/fetch";import {isIncludeCell} from "./table";import {getFieldIdByCellElement} from "../render/av/row";import {processClonePHElement} from "../render/util";+import {setFold} from "../../menus/protyle";const processAV = (range: Range, html: string, protyle: IProtyle, blockElement: HTMLElement) => {const tempElement = document.createElement("template");@@ -556,6 +557,17 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,if (wbrElement) {wbrElement.remove();}+ let foldData;+ if (blockElement.getAttribute("data-type") === "NodeHeading" &&+ blockElement.getAttribute("fold") === "1") {+ foldData = setFold(protyle, blockElement, true, false, false, true);+ doOperation.reverse();+ foldData.doOperations[0].context = {+ focusId: lastElement?.getAttribute("data-node-id"),+ };+ doOperation.push(...foldData.doOperations);+ undoOperation.push(...foldData.undoOperations);+ }transaction(protyle, doOperation, undoOperation);// 复制容器块中包含折叠标题块protyle.wysiwyg.element.querySelectorAll("[parent-heading]").forEach(item => {