Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16684

Vanessab840e452fb83
diff --git a/app/src/protyle/wysiwyg/getBlock.ts b/app/src/protyle/wysiwyg/getBlock.ts
index 67a9cc3008..53242fa46d 100644
--- a/app/src/protyle/wysiwyg/getBlock.ts
+++ b/app/src/protyle/wysiwyg/getBlock.ts
@@ -97,7 +97,7 @@ export const getContenteditableElement = (element: Element): Element => {
return blockElement.firstElementChild;
} else if ("NodeTable" === type) {
return blockElement.querySelector("table");
- } else if ("NodeCodeBlock" === type) {
+ } else if ("NodeCodeBlock" === type && blockElement.classList.contains("code-block")) {
return blockElement.querySelector(".hljs").lastElementChild;
} else if (["NodeBlockQueryEmbed", "NodeMathBlock", "NodeHTMLBlock"].includes(type)) {
return element;