Skip to content

Commit

Permalink
When disableEditing is true, enable editing via toolbars.
Browse files Browse the repository at this point in the history
  • Loading branch information
tleewu committed Jan 5, 2018
1 parent eef3ee0 commit 865c238
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/js/extensions/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,17 @@
var action = this.getAction();

if (action) {
this.execAction(action);
if (this.getEditorOption('disableEditing')) {
this.getEditorElements().forEach(function (element) {
element.setAttribute('contentEditable', 'true');
});
this.execAction(action);
this.getEditorElements().forEach(function (element) {
element.setAttribute('contentEditable', 'inherit');
});
} else {
this.execAction(action);
}
}
},

Expand Down

0 comments on commit 865c238

Please sign in to comment.