Vanessa 2024-02-26 11:53:20 +08:00
parent ff92d1739c
commit 802aaf66a3
2 changed files with 4 additions and 4 deletions

View file

@ -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;
}

View file

@ -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>';
}