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: 禁止数据库页签标题回车和软换行
Vanessa3979a72d1673
diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.tsindex 530b49b707..74c2103fe3 100644--- a/app/src/protyle/wysiwyg/enter.ts+++ b/app/src/protyle/wysiwyg/enter.ts@@ -233,6 +233,10 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyleeditableElement.querySelectorAll(".img--select").forEach(item => {item.classList.remove("img--select");});+ // 数据库+ if (blockElement.getAttribute("data-type") === "NodeAttributeView") {+ return true;+ }// 代码块const trimStartText = editableElement.innerHTML.trimStart();if (trimStartText.startsWith("```") || trimStartText.startsWith("···") || trimStartText.startsWith("~~~") ||diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 78836954c2..5cded90397 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -935,11 +935,17 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {}// 回车- if (!event.altKey && !event.shiftKey && isNotCtrl(event) && event.key === "Enter") {- event.stopPropagation();- event.preventDefault();- enter(nodeElement, range, protyle);- return;+ if (!event.altKey && isNotCtrl(event) && event.key === "Enter") {+ if (!event.shiftKey) {+ enter(nodeElement, range, protyle);+ event.stopPropagation();+ event.preventDefault();+ return;+ } else if (nodeElement.getAttribute("data-type") === "NodeAttributeView") {+ event.stopPropagation();+ event.preventDefault();+ return;+ }}if (matchHotKey("⌘A", event)) {