Skip to content

Commit

Permalink
fix(core): make setEditable trigger all 'update' listeners (#3140)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys-T authored Sep 1, 2022
1 parent c6c5fa6 commit 4851fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class Editor extends EventEmitter<EditorEvents> {
*/
public setEditable(editable: boolean): void {
this.setOptions({ editable })
this.options.onUpdate({ editor: this, transaction: this.state.tr })
this.emit('update', { editor: this, transaction: this.state.tr })
}

/**
Expand Down

0 comments on commit 4851fc5

Please sign in to comment.