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/17815
Vanessa047445b8d9ae
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.tsindex ac21b2230f..f3e3d11a19 100644--- a/app/src/protyle/header/Title.ts+++ b/app/src/protyle/header/Title.ts@@ -152,10 +152,12 @@ export class Title {event.stopPropagation();}} else if (event.key === "Enter") {- const editElement = getContenteditableElement(protyle.wysiwyg.element.firstElementChild);- if (editElement && editElement.textContent === "" && editElement.getAttribute("placeholder")) {+ const firstElement = protyle.wysiwyg.element.firstElementChild;+ const editElement = getContenteditableElement(firstElement);+ if (editElement && editElement.textContent === "" && editElement.getAttribute("placeholder") ||+ firstElement.classList.contains("li")) {// 配合提示文本使用,避免提示文本挤压到第二个块中- focusBlock(protyle.wysiwyg.element.firstElementChild, protyle.wysiwyg.element);+ focusBlock(firstElement, protyle.wysiwyg.element);} else {const newId = Lute.NewNodeID();const newElement = genEmptyElement(false, true, newId);diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.tsindex 20d1dfd753..454e5cfa5a 100644--- a/app/src/protyle/wysiwyg/enter.ts+++ b/app/src/protyle/wysiwyg/enter.ts@@ -21,7 +21,7 @@ import {hasClosestByAttribute, hasClosestByClassName} from "../util/hasClosest";import {blockRender} from "../render/blockRender";export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle) => {- if (hasClosestByClassName(blockElement, "protyle-wysiwyg__embed")) {+ if (hasClosestByClassName(blockElement, "protyle-wysiwyg__embed") && !blockElement.classList.contains("code-block")) {return;}const disableElement = isNotEditBlock(blockElement);