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

Vanessadc17dc51603c
diff --git a/app/src/asset/anno.ts b/app/src/asset/anno.ts
index f0c7ce9777..c0f7a721c0 100644
--- a/app/src/asset/anno.ts
+++ b/app/src/asset/anno.ts
@@ -393,7 +393,7 @@ const showToolbar = (element: HTMLElement, range: Range, target?: HTMLElement) =
};
const getTextNode = (element: HTMLElement, isFirst: boolean) => {
- const spans = element.querySelectorAll(".markedContent span");
+ const spans = element.querySelectorAll('span[role="presentation"]');
let index = isFirst ? 0 : spans.length - 1;
while (spans[index]) {
if (spans[index].textContent) {