import { Editor } from '@tiptap/core'; import React from 'react'; export interface ReactRendererOptions { /** * The editor instance. * @type {Editor} */ editor: Editor; /** * The props for the component. * @type {Record} * @default {} */ props?: Record; /** * The tag name of the element. * @type {string} * @default 'div' */ as?: string; /** * The class name of the element. * @type {string} * @default '' * @example 'foo bar' */ className?: string; } type ComponentType = React.ComponentClass

| React.FunctionComponent

| React.ForwardRefExoticComponent & React.RefAttributes>; /** * The ReactRenderer class. It's responsible for rendering React components inside the editor. * @example * new ReactRenderer(MyComponent, { * editor, * props: { * foo: 'bar', * }, * as: 'span', * }) */ export declare class ReactRenderer = {}> { id: string; editor: Editor; component: any; element: Element; props: P; reactElement: React.ReactNode; ref: R | null; /** * Immediately creates element and renders the provided React component. */ constructor(component: ComponentType, { editor, props, as, className, }: ReactRendererOptions); /** * Render the React component. */ render(): void; /** * Re-renders the React component with new props. */ updateProps(props?: Record): void; /** * Destroy the React component. */ destroy(): void; /** * Update the attributes of the element that holds the React component. */ updateAttributes(attributes: Record): void; } export {}; //# sourceMappingURL=ReactRenderer.d.ts.map