Skip to content

Commit

Permalink
fix: fix editor type for ReactRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Oct 11, 2021
1 parent 134d7f8 commit 2af1870
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react/src/ReactRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { Editor } from './Editor'
import { Editor } from '@tiptap/core'
import { Editor as ExtendedEditor } from './Editor'

function isClassComponent(Component: any) {
return !!(
Expand Down Expand Up @@ -30,7 +31,7 @@ type ComponentType =
export class ReactRenderer {
id: string

editor: Editor
editor: ExtendedEditor

component: any

Expand All @@ -45,7 +46,7 @@ export class ReactRenderer {
constructor(component: ComponentType, { editor, props = {}, as = 'div' }: ReactRendererOptions) {
this.id = Math.floor(Math.random() * 0xFFFFFFFF).toString()
this.component = component
this.editor = editor
this.editor = editor as ExtendedEditor
this.props = props
this.element = document.createElement(as)
this.element.classList.add('react-renderer')
Expand Down

0 comments on commit 2af1870

Please sign in to comment.