Appearance
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.
| Name | Type | Default | Two-way (model) | Required | Description |
|---|---|---|---|---|---|
nodes | Array | [] | 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). | ||
namespace | String | '' | The Lexical editor namespace (scopes clipboard/collaboration). Falls back to rozie-lexical when left empty. | ||
ariaLabel | String | null | Accessible name (aria-label) applied to the contenteditable host. Omitted from the DOM when unset — supply one for a labelled editing region. | ||
theme | Object | {} | 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
- Lexical — showcase & API — install, composition, the plugin list, the toolbar, and the scope/posture notes.
- Lexical libraries comparison — how
@rozie-ui/lexicalstacks up against the per-framework wrappers. - Decorator node authoring recipe — author a custom node + its per-target mount bridge.