From d6b597c0a7f059fc678e8de5c954680614f3ab55 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 14 Feb 2025 18:32:10 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13934 --- app/src/protyle/render/util.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/render/util.ts b/app/src/protyle/render/util.ts index 29fccb951..a1c26b0cb 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 '
'; } @@ -14,7 +14,7 @@ export const genIconHTML = (element?: false|HTMLElement) => { `; }; -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")));