From 802aaf66a3a8045cf708b452b673c626c1f4e07b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 26 Feb 2024 11:53:20 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/10432 --- app/src/assets/scss/protyle/_wysiwyg.scss | 4 ++-- app/src/protyle/render/util.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index 66c5f3fb7b7..03844accb45 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 778d468d702..0a72f7f42f2 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 '
'; }