lexical

From public sources

Lexical is an extensible, MIT-licensed text editor framework library for building reliable, accessible and fast rich text editors in web apps.

LibraryCategory: Libraries & SDKs · UI & editorsOpen sourcedata checked Oct 15, 2026

Overview

Building a rich text editor from scratch means handling cursor state, selections, undo history, accessibility and cross-browser quirks, which is slow and error-prone. Lexical is an open-source JavaScript library from Meta that provides this editing core so developers can focus on the features their product needs. The framework is agnostic of any UI framework, with official React bindings through @lexical/react. Its immutable state model gives built-in undo and redo, and its plugin-based architecture lets teams add custom nodes, tables, lists, code blocks and images. Content can be imported and exported as JSON, Markdown or HTML, and collaborative editing is supported through the Yjs integration. Lexical is aimed at web developers building text input features in applications and is installed as an npm package. It is released under the MIT license and supports recent versions of Chrome, Firefox, Safari and Edge. The library is written in TypeScript with full type definitions and is documented on lexical.dev.
  • editor

Installation

Commands are shown, never run by the marketplace. Check them against the official documentation.
  • Official websiteFrom public sourcesfrom catalog metadata
    lexical.dev/ ↗
  • Build from sourceFrom public sourcesfrom catalog metadata

    Build from source: no validated build recipe — follow the repository instructions.

    github.com/facebook/lexical ↗

Compatibility

Unknown means no evidence was found — not that the product is incompatible.
PlatformStatusArchitectureEvidenceConfidence
Node.jsUnknown———
PythonUnknown———
JVMUnknown———
.NETUnknown———
WebAssemblyUnknown———
Web browserUnknown———

Releases

checked Oct 29, 2026
v0.53.0LatestOct 28, 2026Official source ↗

Files in 0.53.0

This release has no attached files.

Release history

Quality profile

algorithm quality-v1.0 · assessed Oct 15, 2026
Quality Score98
Risk Score0
Confidence 1.00
Quality Score and Risk Score are different measures. A high score does not guarantee safety.

Score components

Maintenance · 2020
last activity 0 days ago
Documentation · 1515
README 5562 chars, description present
Ready to use · 1515
install instructions: yes; releases: yes
Metadata · 108
3/4 of description, homepage, license, topics
Releases · 1010
10 release(s), latest 17 days ago
Category confidence · 1010
classifier confidence 1
Adoption · 1010
23952 stars (log-dampened, 10k = max)
License clarity · 55
SPDX MIT
Community · 55
issues enabled, 2247 forks

License

MIT
Known licensefrom the repository host

This is the catalog policy status, not legal advice.

Sources

github.com/facebook/lexicalPrimary★ 23,952 starslast activity Oct 15, 2026Primary repository · Confidence 1.00

Reviews

Sign in to write a review

No reviews yet.

Alternatives

README

From facebook/lexical · license MIT · fetched Oct 29, 2026

Features

  • Framework Agnostic Core - Works with any UI framework, with official React bindings
  • Reliable & Accessible - Built-in accessibility support and WCAG compliance
  • Extensible - Plugin-based architecture with powerful extension points
  • Immutable State Model - Time-travel ready with built-in undo/redo
  • Collaborative Editing - Real-time collaboration via Yjs integration
  • Serialization - Import/export from JSON, Markdown, and HTML
  • Rich Content - Support for tables, lists, code blocks, images, and custom nodes
  • Cross-browser - Firefox 115+, Safari 15+, Chrome 86+ (see Supported Browsers)
  • Type Safe - Written in TypeScript with comprehensive type definitions

Quick Start

For framework-agnostic usage, start with the Vanilla JS quick start or the Vanilla JS example.

For React applications, install Lexical with the official React bindings:

npm install lexical @lexical/react
import { $getRoot, $getSelection } from 'lexical';
import { LexicalComposer } from '@lexical/react/LexicalComposer';
import { PlainTextPlugin } from '@lexical/react/LexicalPlainTextPlugin';
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';

const initialConfig = {
  namespace: 'MyEditor',
  onError: (error) => console.error(error),
};

function Editor() {
  return (
    <LexicalComposer initialConfig={initialConfig}>
      <PlainTextPlugin
        contentEditable={<ContentEditable />}
        ErrorBoundary={LexicalErrorBoundary}
      />
      <HistoryPlugin />
    </LexicalComposer>
  );
}

Try it yourself:

Development

# Install dependencies
pnpm install

# Start playground dev server
pnpm run start

# Run tests
pnpm run test-unit
pnpm run test-e2e-chromium

# Lint and type check
pnpm run ci-check

See CONTRIBUTING.md for detailed development guidelines.

Documentation

Community & Support

Browser Support

BrowserVersion
Chrome86+
Firefox115+
Safari15+
Edge86+

Contributors

We welcome contributions! Please read our Contributing Guide to learn about our development process and how to propose bugfixes and improvements.

License

MIT License Copyright ©2026 Meta Platforms, Inc.

Open the repository ↗