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/17626
Vanessa4f3a46d839e4
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.tsindex 04e894664d..d321c5379a 100644--- a/app/src/protyle/util/paste.ts+++ b/app/src/protyle/util/paste.ts@@ -355,7 +355,12 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven}}- const nodeElement = hasClosestBlock(event.target);++ let nodeElement = hasClosestBlock(event.target);+ const range = getEditorRange(protyle.wysiwyg.element);+ if (!nodeElement) {+ nodeElement = hasClosestBlock(range.startContainer);+ }if (!nodeElement) {if (files && files.length > 0) {uploadFiles(protyle, files);@@ -368,7 +373,6 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEvenitem.classList.remove("protyle-wysiwyg--hl");});const code = processPasteCode(textHTML, textPlain, originalTextHTML, protyle);- const range = getEditorRange(protyle.wysiwyg.element);if (nodeElement.getAttribute("data-type") === "NodeCodeBlock" ||protyle.toolbar.getCurrentType(range).includes("code")) {// https://github.com/siyuan-note/siyuan/issues/13552