diff --git a/packages/tiptap/src/components/editor.js b/packages/tiptap/src/components/editor.js index 4f54daeb..db2ce294 100644 --- a/packages/tiptap/src/components/editor.js +++ b/packages/tiptap/src/components/editor.js @@ -195,6 +195,12 @@ export default { }) }, + destroyEditor() { + if (this.view) { + this.view.destroy() + } + }, + updateMenuActions() { this.menuActions = buildMenuActions({ schema: this.schema, @@ -233,4 +239,8 @@ export default { this.initEditor() }, + beforeDestroy() { + this.destroyEditor() + }, + }