From f6d8776ca086bf1f2edc6dc099e33a1f00fdd4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Fri, 16 Apr 2021 23:34:29 +0200 Subject: [PATCH] fix: fix editor type for VueRenderer, fix #281 --- packages/vue-3/src/VueRenderer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vue-3/src/VueRenderer.ts b/packages/vue-3/src/VueRenderer.ts index 422195afa8c..d3c5bd66c0f 100644 --- a/packages/vue-3/src/VueRenderer.ts +++ b/packages/vue-3/src/VueRenderer.ts @@ -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