Skip to content

Commit

Permalink
feat(editor): rename attribute from data-readonly to readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
luolonghao committed Oct 31, 2024
1 parent 498c874 commit 323624c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/css/mention.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
border: 1px solid transparent;
border-radius: 2px;
}
.lake-container[data-readonly="false"] .lake-mention a:hover {
.lake-container[readonly="false"] .lake-mention a:hover {
color: var(--lake-link-color);
text-decoration: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class Editor {
contenteditable: this.readonly ? 'false' : 'true',
spellcheck: this.config.spellcheck ? 'true' : 'false',
tabindex: this.config.tabIndex.toString(),
'data-readonly': this.readonly ? 'true' : 'false',
readonly: this.readonly ? 'true' : 'false',
});
if (this.config.placeholder !== '') {
this.container.attr('placeholder', this.config.placeholder);
Expand Down

0 comments on commit 323624c

Please sign in to comment.