@lexical/react/LexicalExtensionEditorComposer
Interfaces
LexicalExtensionEditorComposerProps
Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:13
Properties
children?
optionalchildren?:ReactNode
Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:21
Any children will have access to useLexicalComposerContext (e.g. for React plug-ins or UX)
disposeOnUnmount?
optionaldisposeOnUnmount?:boolean
Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:29
When false, this component will NOT call initialEditor.dispose() on
unmount. Use this when the editor's lifetime is managed elsewhere (for
example, when the editor is stored on a node and the component may be
remounted later to re-attach to the same editor). Defaults to true to
preserve the original behavior for stand-alone editors.
initialEditor
initialEditor:
LexicalEditorWithDispose
Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:17
Your root extension, typically defined with defineExtension
Functions
LexicalExtensionEditorComposer()
LexicalExtensionEditorComposer(
__namedParameters):Element
Defined in: packages/lexical-react/src/LexicalExtensionEditorComposer.tsx:40
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