Skip to main content

Variable: ReactExtension

const ReactExtension: LexicalExtension<ReactConfig, "@etrepum/lexical-builder/React", ReactOutputs, unknown>

An extension to use or configure React for use with Lexical. In an editor, you would typically use LexicalExtensionComposer (for React projects) or ReactPluginHostExtension (to use React Extensions and plug-ins in a non-React project).

See ReactConfig for more detailed exextensionations of how to use the config for this Extension.

For an Extension developer, you can defineConfig() override the extension with decorators to add JSX inside the editor context that is not location-dependent (e.g. floating UI that does not need to be mounted in some specific location, or effects that return null).

Defined in

ReactExtension.tsx:45