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/13871

Vanessab7318d920428
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 5550bdcf40..701b7bedd8 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -202,6 +202,9 @@ export class WYSIWYG {
inlineElement.tagName === "SPAN" &&
inlineElement.textContent !== inputData &&
!currentTypes.includes("search-mark") && // https://github.com/siyuan-note/siyuan/issues/7586
+ !currentTypes.includes("code") && // https://github.com/siyuan-note/siyuan/issues/13871
+ !currentTypes.includes("kbd") &&
+ !currentTypes.includes("tag") &&
range.toString() === "" && range.startContainer.nodeType === 3 &&
(currentTypes.includes("inline-memo") || currentTypes.includes("text") || currentTypes.includes("block-ref") || currentTypes.includes("file-annotation-ref") || currentTypes.includes("a")) &&
!hasNextSibling(range.startContainer) && range.startContainer.textContent.length === range.startOffset &&