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

Vanessad6b597c0a7f0
diff --git a/app/src/protyle/render/util.ts b/app/src/protyle/render/util.ts
index 29fccb951a..a1c26b0cb7 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) => {
+export const genIconHTML = (element?: false | HTMLElement) => {
let enable = true;
if (element) {
- const readonly = element.getAttribute("contenteditable");
+ const readonly = element.getAttribute("data-readonly");
if (typeof readonly === "string") {
- enable = element.getAttribute("contenteditable") === "true";
+ enable = readonly === "false";
} else {
return '<div class="protyle-icons"></div>';
}
@@ -14,7 +14,7 @@ export const genIconHTML = (element?: false|HTMLElement) => {
</div>`;
};
-export const processClonePHElement = (item:Element) => {
+export const processClonePHElement = (item: Element) => {
if (item.getAttribute("data-type") === "NodeHTMLBlock") {
const phElement = item.querySelector("protyle-html");
phElement.setAttribute("data-content", Lute.UnEscapeHTMLStr(phElement.getAttribute("data-content")));