Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/5386

Vanessae420934530cc
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 7b44573795..e548a76f0e 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -1289,10 +1289,7 @@ export class WYSIWYG {
// 不可编辑的块处理
const nodeElement = hasClosestBlock(range.startContainer);
if (nodeElement) {
- if (isNotEditBlock(nodeElement) && !this.element.querySelector(".protyle-wysiwyg--select")) {
- nodeElement.classList.add("protyle-wysiwyg--select");
- countBlockWord([nodeElement.getAttribute("data-node-id")]);
- } else if (!nodeElement.classList.contains("protyle-wysiwyg--select")) {
+ if (!nodeElement.classList.contains("protyle-wysiwyg--select")) {
countSelectWord(range);
}
this.setEmptyOutline(protyle, nodeElement);