Skip to content

Commit

Permalink
🎨 #10432
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Feb 26, 2024
1 parent ff92d17 commit 802aaf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/src/assets/scss/protyle/_wysiwyg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/protyle/render/util.ts
Original file line number Diff line number Diff line change
@@ -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>';
}
Expand Down

0 comments on commit 802aaf6

Please sign in to comment.