Skip to content

API reference

The <LexicalEditor> shell surface. The table below is generated live from the LexicalEditor.rozie IR on every docs build, so it can never drift from the compiled output. For the compositional model (plugin children, the $inject contract), the toolbar, and the decorator node see the showcase; for the per-framework consumption code see the usage page.

Props

The shell's props are the editor-construction surface — extra nodes, the Lexical namespace, the host ariaLabel, and the theme class map. Behavior (undo, lists, links, formatting) is added by nesting plugin children, not by props.

NameTypeDefaultTwo-way (model)RequiredDescription
nodesArray[]Extra Lexical node classes to register at editor creation. Lexical requires every node class to be declared up front, so consumer node extensions are passed here and composed after the built-in RichText/List/Link + @mention MentionNode set (the reference DecoratorNode is registered by the shell itself; these consumer nodes are composed last so they win).
namespaceString''The Lexical editor namespace (scopes clipboard/collaboration). Falls back to rozie-lexical when left empty.
ariaLabelStringnullAccessible name (aria-label) applied to the contenteditable host. Omitted from the DOM when unset — supply one for a labelled editing region.
themeObject{}Lexical theme object mapping node/format types to CSS class names. The styling hook for this deliberately-unstyled primitive (D-12) — bring your own design-system classes.

Plugins & toolbar

The plugin and toolbar components are composition, not props — nest them as children of <LexicalEditor> and they $inject the shared editor. See the showcase's Plugins section for the full list (RichTextPlugin / HistoryPlugin / ListPlugin / LinkPlugin) and the toolbar section. Custom children join the same editor via the $inject('rozie-lexical-editor') contract.

See also

Pre-v1.0 — internal monorepo.