Skip to main content

@lexical/react/LexicalExtensionEditorComposer

Interfaces

LexicalExtensionEditorComposerProps

Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:12

Properties

children?

optional children?: ReactNode

Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:26

Any children will have access to useLexicalComposerContext (e.g. for React plug-ins or UX)

initialEditor

initialEditor: LexicalEditorWithDispose

Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:22

Your root extension, typically defined with defineExtension. The lifecycle of this editor is not owned by this component, you are responsible for calling initialEditor.dispose() if needed. Note also that any LexicalEditor can only be rendered to one root element, so if you try and use it from multiple components simultaneously then it will only be managed correctly by the last one to render.

Functions

LexicalExtensionEditorComposer()

LexicalExtensionEditorComposer(__namedParameters): Element

Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:37

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.

Parameters

__namedParameters

LexicalExtensionEditorComposerProps

Returns

Element