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

Vanessa802aaf66a3a8
diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss
index 66c5f3fb7b..03844accb4 100644
--- a/app/src/assets/scss/protyle/_wysiwyg.scss
+++ b/app/src/assets/scss/protyle/_wysiwyg.scss
@@ -630,8 +630,8 @@
}
}
-.protyle-wysiwyg:not([custom-sy-readonly]),
-.protyle-wysiwyg[custom-sy-readonly="true"] {
+.protyle-wysiwyg:not([contenteditable]),
+.protyle-wysiwyg[contenteditable="false"] {
.img:hover .protyle-icons {
display: none;
}
diff --git a/app/src/protyle/render/util.ts b/app/src/protyle/render/util.ts
index 778d468d70..0a72f7f42f 100644
--- a/app/src/protyle/render/util.ts
+++ b/app/src/protyle/render/util.ts
@@ -1,9 +1,9 @@
export const genIconHTML = (element?: false|HTMLElement) => {
let enable = true;
if (element) {
- const readonly = element.getAttribute("custom-sy-readonly");
+ const readonly = element.getAttribute("contenteditable");
if (typeof readonly === "string") {
- enable = element.getAttribute("custom-sy-readonly") === "false";
+ enable = element.getAttribute("contenteditable") === "true";
} else {
return '<div class="protyle-icons"></div>';
}