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

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