Lexical
PackageMeta's extensible text editor framework with React bindings, MIT licensed
- Price
- Free, open source
- Access
- None, runs in the browser
About
Extensible text editor framework from Meta: a small dependency-free core, React bindings and extensions for rich text, lists, tables, links, Markdown and Yjs collaboration. MIT and free. Still on 0.x versions, so minor releases can break; official bindings cover plain JavaScript and React only.
What you can do with it
- Add a rich text editor with lists, links and tables to a React app
- Build plain-text inputs with mentions and hashtags in plain JavaScript
- Add real-time collaborative editing to a text editor with Yjs
Get started
- Run npm install lexical @lexical/extension @lexical/rich-text @lexical/history
- Build the editor from extensions and set its root element
Example
import { buildEditorFromExtensions } from "@lexical/extension";
import { HistoryExtension } from "@lexical/history";
import { RichTextExtension } from "@lexical/rich-text";
import { defineExtension } from "lexical";
const AppExtension = defineExtension({
name: "my-editor",
dependencies: [RichTextExtension, HistoryExtension],
});
const editor = buildEditorFromExtensions(AppExtension);
editor.setRootElement(document.getElementById("editor"));Details
- Hosting
- Runs locally
- Available in
- Worldwide
- Official SDKs
- JavaScript/TypeScript
- MCP server
- None