fix: fix editor type for VueRenderer, fix #281

This commit is contained in:
Philipp Kühn
2021-04-16 23:34:29 +02:00
parent 07c6d51338
commit f6d8776ca0

View File

@@ -1,6 +1,6 @@
import { reactive, markRaw, Component } from 'vue'
import { AnyObject } from '@tiptap/core'
import { Editor } from './Editor'
import { AnyObject, Editor } from '@tiptap/core'
import { Editor as ExtendedEditor } from './Editor'
export interface VueRendererOptions {
editor: Editor,
@@ -10,7 +10,7 @@ export interface VueRendererOptions {
export class VueRenderer {
id: string
editor: Editor
editor: ExtendedEditor
component: Component
@@ -22,7 +22,7 @@ export class VueRenderer {
constructor(component: Component, { props = {}, editor }: VueRendererOptions) {
this.id = Math.floor(Math.random() * 0xFFFFFFFF).toString()
this.editor = editor
this.editor = editor as ExtendedEditor
this.component = markRaw(component)
this.teleportElement = document.createElement('div')
this.element = this.teleportElement