Browse Source

Request PR change

pull/2429/head
adriangroch 7 years ago
parent
commit
4870282bc7
  1. 5
      src/rich_text_editor/model/RichTextEditor.js

5
src/rich_text_editor/model/RichTextEditor.js

@ -195,7 +195,10 @@ export default class RichTextEditor {
*/
syncActions() {
this.getActions().forEach(action => {
if (!action.state || (action.state && action.state() >= 0)) {
if (
!action.state ||
(action.state && action.state(this, this.doc) >= 0)
) {
const event = action.event || 'click';
action.btn[`on${event}`] = e => {
action.result(this, action);

Loading…
Cancel
Save