@haklex/rich-static-renderer
v0.0.95
Published
Headless SSR engine for Lexical rich content
Readme
@haklex/rich-static-renderer
SSR-ready renderer engine for Lexical rich content. Renders Lexical editor state JSON to React without loading the full editor runtime.
Installation
pnpm add @haklex/rich-static-rendererPeer Dependencies
This package depends on @lexical/code-core (Lexical 0.42+ code blocks, no Prism). Add @lexical/code-core yourself only if your app imports it directly.
| Package | Version |
| -------------------- | --------- |
| @lexical/extension | ^0.42.0 |
| @lexical/link | ^0.42.0 |
| @lexical/list | ^0.42.0 |
| @lexical/rich-text | ^0.42.0 |
| @lexical/table | ^0.42.0 |
| lexical | ^0.42.0 |
| react | >=19 |
| react-dom | >=19 |
Usage
import { RichRenderer } from '@haklex/rich-static-renderer';
import '@haklex/rich-editor/style.css';
<RichRenderer value={editorState} variant="article" theme="light" />;The value prop accepts a Lexical SerializedEditorState JSON object. The renderer parses it into React elements without instantiating a Lexical editor, making it suitable for SSR and static rendering.
Exports
Components
| Export | Description |
| -------------- | ------------------------------ |
| RichRenderer | Main static renderer component |
Types
| Export | Description |
| --------------------- | ---------------------------------------- |
| RichRendererProps | Props for RichRenderer |
| BuiltinNodeRenderer | Type for builtin node renderer functions |
Part of Haklex
This package is part of the Haklex rich editor ecosystem.
License
MIT
