An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: fix https://github.com/siyuan-note/siyuan/issues/10686
Vanessa9d740f26c1a1
diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.tsindex 274493374e..c64d5d169e 100644--- a/app/src/protyle/wysiwyg/enter.ts+++ b/app/src/protyle/wysiwyg/enter.ts@@ -219,9 +219,10 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle// 回车之前的块为 1\n\n2 时会产生多个块Array.from(enterElement.children).forEach((item: HTMLElement) => {if (item.dataset.nodeId === id) {- const previousElement = blockElement.previousElementSibling;+ const blockPreviousElement = blockElement.previousElementSibling;+ const blockParentElement = blockElement.parentElement;blockElement.outerHTML = item.outerHTML;- blockElement = (previousElement?.nextElementSibling || protyle.wysiwyg.element.firstElementChild) as HTMLElement;+ blockElement = (blockPreviousElement ? blockPreviousElement.nextElementSibling : blockParentElement.firstElementChild) as HTMLElement;doOperation.push({action: "update",data: blockElement.outerHTML,