Skip to content

Commit cffc4cd

Browse files
committed
fix: image component
1 parent 67e77a5 commit cffc4cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/custom-extensions/extension-image-upload/imagePlaceholder.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import type { Component } from 'vue'
2+
13
import { Node, nodeInputRule } from '@tiptap/core'
24
import { VueNodeViewRenderer } from '@tiptap/vue-3'
5+
36
import ImagePlaceholderComponent from './ImagePlaceholder.vue'
47

58
export interface ImagePlaceholderOptions {
@@ -48,8 +51,7 @@ export const ImagePlaceholder = Node.create<ImagePlaceholderOptions>({
4851
},
4952

5053
addNodeView() {
51-
const imagePlaceholderComponent = new ImagePlaceholderComponent()
52-
return VueNodeViewRenderer(imagePlaceholderComponent)
54+
return VueNodeViewRenderer(ImagePlaceholderComponent as Component)
5355
},
5456

5557
addInputRules() {

0 commit comments

Comments
 (0)