improve some types, fix #213

This commit is contained in:
Philipp Kühn
2021-03-17 21:21:57 +01:00
parent 7d740a5cd8
commit 7d52a3aad1
8 changed files with 13 additions and 13 deletions

View File

@@ -3,14 +3,14 @@ import { EditorOptions } from '@tiptap/core'
import { Editor } from './Editor'
export const useEditor = (options: Partial<EditorOptions> = {}) => {
const editor = ref()
const editor = ref<Editor>()
onMounted(() => {
editor.value = new Editor(options)
})
onBeforeUnmount(() => {
editor.value.destroy()
editor.value?.destroy()
})
return editor