docs: Update events.md (#2152)

missing closing parens
This commit is contained in:
Rafi Miller
2021-11-10 00:15:17 +02:00
committed by GitHub
parent 2bbc594ac9
commit 38b533dc48

View File

@@ -76,35 +76,35 @@ Or you can register your event listeners on a running editor instance:
```js ```js
editor.on('beforeCreate', ({ editor }) => { editor.on('beforeCreate', ({ editor }) => {
// Before the view is created. // Before the view is created.
} })
editor.on('create', ({ editor }) => { editor.on('create', ({ editor }) => {
// The editor is ready. // The editor is ready.
} })
editor.on('update', ({ editor }) => { editor.on('update', ({ editor }) => {
// The content has changed. // The content has changed.
} })
editor.on('selectionUpdate', ({ editor }) => { editor.on('selectionUpdate', ({ editor }) => {
// The selection has changed. // The selection has changed.
} })
editor.on('transaction', ({ editor, transaction }) => { editor.on('transaction', ({ editor, transaction }) => {
// The editor state has changed. // The editor state has changed.
} })
editor.on('focus', ({ editor, event }) => { editor.on('focus', ({ editor, event }) => {
// The editor is focused. // The editor is focused.
} })
editor.on('blur', ({ editor, event }) => { editor.on('blur', ({ editor, event }) => {
// The editor isnt focused anymore. // The editor isnt focused anymore.
} })
editor.on('destroy', () => { editor.on('destroy', () => {
// The editor is being destroyed. // The editor is being destroyed.
} })
``` ```
#### Unbind event listeners #### Unbind event listeners