fix: use shallowRef on Editor (#1804)
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import { onMounted, onBeforeUnmount, ref } from 'vue'
|
import { onMounted, onBeforeUnmount, shallowRef } from 'vue'
|
||||||
import { EditorOptions } from '@tiptap/core'
|
import { EditorOptions } from '@tiptap/core'
|
||||||
import { Editor } from './Editor'
|
import { Editor } from './Editor'
|
||||||
|
|
||||||
export const useEditor = (options: Partial<EditorOptions> = {}) => {
|
export const useEditor = (options: Partial<EditorOptions> = {}) => {
|
||||||
const editor = ref<Editor>()
|
const editor = shallowRef<Editor>()
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
editor.value = new Editor(options)
|
editor.value = new Editor(options)
|
||||||
|
|||||||
Reference in New Issue
Block a user