Skip to content

Commit

Permalink
Merge pull request #25 from amk0/master
Browse files Browse the repository at this point in the history
Added not null check for editables when setting readOnly
  • Loading branch information
schmunk42 authored Jun 30, 2021
2 parents 51a072d + 3663053 commit bb108e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assets/editors/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class CKEditorEditor extends StringEditor {
enable () {
if(!this.always_disabled) {
this.input.disabled = false;
if(this.instance) {
if(this.instance && this.instance.editable()) {
this.instance.setReadOnly(false);
}
super.enable();
Expand All @@ -151,7 +151,7 @@ class CKEditorEditor extends StringEditor {
disable (always_disabled) {
if(always_disabled) this.always_disabled = true;
this.input.disabled = true;
if(this.instance) {
if(this.instance && this.instance.editable()) {
this.instance.setReadOnly(true);
}
super.disable();
Expand Down

0 comments on commit bb108e8

Please sign in to comment.