Lexical gives you a lightweight core for rich text editing with React bindings or vanilla JS. Plugins add lists, tables, links, and custom nodes with accessible, immutable editor state.
Overview
Lexical is a modular text editor framework for web applications. Each editor instance attaches to a contenteditable element and tracks current and pending editor states, with undo and redo built on an immutable model.
The core stays UI-framework agnostic, with official React integrations and vanilla JavaScript quick starts. Features such as toolbars, markdown, or rich formatting arrive through plugins rather than a fixed bundled UI, which keeps the base small.
Serialization supports JSON, Markdown, and HTML import and export. Node types can cover tables, lists, code blocks, images, and custom structures. The project targets WCAG-oriented accessibility and common desktop browser versions.
Documentation, examples, and a playground illustrate patterns from simple inputs to block editors, chat composers, and richer compositions teams can extend.
Key features
- Framework-agnostic core with React bindings
- Plugin-based extension model
- Immutable state with undo and redo
- JSON, Markdown, and HTML serialization
- Tables, lists, and custom nodes
- TypeScript typings throughout
- Built-in accessibility focus
- Cross-browser desktop support
Use cases
- In-app rich text and comment fields
- Notion-style block editors
- Chat and support message composers
- CMS or docs authoring surfaces
- Custom collaborative editing UIs