add resize event

This commit is contained in:
Philipp Kühn
2021-04-01 16:21:47 +02:00
parent b9ee5555e5
commit c68fa74ad1
3 changed files with 24 additions and 0 deletions

View File

@@ -31,6 +31,9 @@ const editor = new Editor({
onBlur({ editor, event }) {
// The editor isnt focused anymore.
},
onResize({ editor, event }) {
// The editor view has resized.
},
onDestroy() {
// The editor is being destroyed.
},
@@ -70,6 +73,10 @@ editor.on('blur', ({ editor, event }) => {
// The editor isnt focused anymore.
}
editor.on('resize', ({ editor, event }) => {
// The editor view has resized.
}
editor.on('destroy', () => {
// The editor is being destroyed.
}
@@ -118,6 +125,9 @@ const CustomExtension = Extension.create({
onBlur({ editor, event }) {
// The editor isnt focused anymore.
},
onResize({ editor, event }) {
// The editor view has resized.
},
onDestroy() {
// The editor is being destroyed.
},