UNPKG

@lexical/react

Version:

This package provides Lexical components and hooks for React applications.

21 lines (20 loc) 950 B
import { LexicalEditorWithDispose } from 'lexical'; export interface LexicalExtensionEditorComposerProps { /** * Your root extension, typically defined with {@link defineExtension} */ initialEditor: LexicalEditorWithDispose; /** * Any children will have access to useLexicalComposerContext (e.g. for React plug-ins or UX) */ children?: React.ReactNode; } /** * The equivalent of LexicalComposer for an editor that was already built for * extensions, typically used with nested editors. * * Make sure that your initialEditor argument is stable (e.g. using module scope or useMemo) so * that you are not re-creating the editor on every render! The editor should be built with * ReactProviderExtension and ReactExtension dependencies. */ export declare function LexicalExtensionEditorComposer({ initialEditor: editor, children, }: LexicalExtensionEditorComposerProps): import("react/jsx-runtime").JSX.Element;