Skip to content

Commit

Permalink
fix: image component
Browse files Browse the repository at this point in the history
  • Loading branch information
modbender committed Dec 1, 2024
1 parent 67e77a5 commit cffc4cd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { Component } from 'vue'

import { Node, nodeInputRule } from '@tiptap/core'
import { VueNodeViewRenderer } from '@tiptap/vue-3'

import ImagePlaceholderComponent from './ImagePlaceholder.vue'

export interface ImagePlaceholderOptions {
Expand Down Expand Up @@ -48,8 +51,7 @@ export const ImagePlaceholder = Node.create<ImagePlaceholderOptions>({
},

addNodeView() {
const imagePlaceholderComponent = new ImagePlaceholderComponent()
return VueNodeViewRenderer(imagePlaceholderComponent)
return VueNodeViewRenderer(ImagePlaceholderComponent as Component)
},

addInputRules() {
Expand Down

0 comments on commit cffc4cd

Please sign in to comment.