fix: use shallowRef on Editor (#1804)

This commit is contained in:
Mauricio Walters
2021-08-26 05:08:33 -07:00
committed by GitHub
parent 96a7310b9d
commit 46701fde66

View File

@@ -1,9 +1,9 @@
import { onMounted, onBeforeUnmount, ref } from 'vue'
import { onMounted, onBeforeUnmount, shallowRef } from 'vue'
import { EditorOptions } from '@tiptap/core'
import { Editor } from './Editor'
export const useEditor = (options: Partial<EditorOptions> = {}) => {
const editor = ref<Editor>()
const editor = shallowRef<Editor>()
onMounted(() => {
editor.value = new Editor(options)