Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance. https://lexical.dev
Find a file
2026-03-19 20:05:39 +00:00
.github [*] Chore: Upgrade rollup packages and configure terser for ascii_only output (#8239) 2026-03-19 19:26:13 +00:00
.husky npm -> pnpm (#8035) 2025-12-21 23:14:26 +00:00
.vscode Configure ESLint: enable curly rule, fix on save (#5666) 2024-02-29 13:25:38 -07:00
examples Fix rollup CVE-2026-27606 in example project lockfiles (#8182) 2026-02-27 16:18:07 +00:00
flow-typed/environments [lexical] Chore: Update flow-bin (to 0.289.0) and LexicalLink Flow types (#7973) 2025-11-06 15:51:38 +00:00
libdefs [lexical] Chore: Update flow-bin (to 0.289.0) and LexicalLink Flow types (#7973) 2025-11-06 15:51:38 +00:00
packages [lexical-playground][lexical-react] Bug Fix: Fix accessor implementations to use getLatest/getWritable consistently (#8241) 2026-03-19 20:05:39 +00:00
scripts [*] Chore: Upgrade rollup packages and configure terser for ascii_only output (#8239) 2026-03-19 19:26:13 +00:00
.eslintignore [examples] Feature: sveltekit ssr example (#7879) 2025-10-02 17:33:03 +00:00
.eslintrc.js [lexical-eslint-plugin] Chore: update @lexical/eslint-plugin for better eslint 9+ support, finish jest to vitest migration (#8227) 2026-03-16 17:19:35 +00:00
.flowconfig [lexical-extension][lexical-react] Feature: LexicalExtensionEditorComposer, NestedEditorExtension, and fixed SharedHistoryExtension with playground refactor (#8202) 2026-03-17 19:09:53 +00:00
.gitignore Bug Fix: ContextMenu Paste option not preserving style (#6780) 2024-11-05 01:22:51 +00:00
.hintrc feat: make icons and popups dynamic & change file structure (#3336) 2022-11-10 16:03:27 +00:00
.lintstagedrc.js [lexical][lexical-extension][*] Feature: Lexical Extension (#7706) 2025-09-24 03:17:25 +00:00
.nvmrc npm -> pnpm (#8035) 2025-12-21 23:14:26 +00:00
.pnpmrc Use PNPM workspace feature for publish (#8050) 2025-12-25 02:32:38 +00:00
.prettierignore npm -> pnpm (#8035) 2025-12-21 23:14:26 +00:00
.prettierrc [lexical-website] Chore: Update docusaurus-plugin-typedoc (#7766) 2025-09-07 15:21:39 +00:00
.watchmanconfig Add basic selection tests 2022-04-09 00:39:14 -07:00
AGENTS.md [*] Chore: Upgrade rollup packages and configure terser for ascii_only output (#8239) 2026-03-19 19:26:13 +00:00
babel.config.js [lexical-react] Breaking change: Deprecate public default exports (#6088) 2024-05-16 21:40:34 +00:00
CHANGELOG.md v0.41.0 (#8166) 2026-02-25 18:05:14 +00:00
CLAUDE.md Agent documentation (#8031) 2025-12-17 13:48:14 +00:00
CODE_OF_CONDUCT.md Add sort keys and sort imports lint rules, and enable fix+format on save (#1209) 2022-04-09 00:43:22 -07:00
CONTRIBUTING.md npm -> pnpm (#8035) 2025-12-21 23:14:26 +00:00
flow-typed.config.json [lexical] Chore: Update flow-bin to 0.280.0 (#7785) 2025-08-31 16:07:02 +00:00
LICENSE Initial commit 2022-04-09 00:39:05 -07:00
package.json [*] Chore: Upgrade rollup packages and configure terser for ascii_only output (#8239) 2026-03-19 19:26:13 +00:00
playwright.config.js npm -> pnpm (#8035) 2025-12-21 23:14:26 +00:00
pnpm-lock.yaml [*] Chore: Upgrade rollup packages and configure terser for ascii_only output (#8239) 2026-03-19 19:26:13 +00:00
pnpm-workspace.yaml Update examples for v0.40.0 and pnpm (#8110) 2026-02-02 19:35:48 +00:00
README.md docs: fix formatting and update browser support table (#8144) 2026-02-14 19:25:00 +00:00
tsconfig.build.json [lexical-extension][lexical-react] Feature: LexicalExtensionEditorComposer, NestedEditorExtension, and fixed SharedHistoryExtension with playground refactor (#8202) 2026-03-17 19:09:53 +00:00
tsconfig.json [lexical-extension][lexical-react] Feature: LexicalExtensionEditorComposer, NestedEditorExtension, and fixed SharedHistoryExtension with playground refactor (#8202) 2026-03-17 19:09:53 +00:00
tsconfig.test.json chore: allow tsc to typecheck tests, fix type issues in those tests (#5982) 2024-05-02 17:58:18 -04:00
tsdoc.json [lexical-website] Chore: Update docusaurus-plugin-typedoc (#7766) 2025-09-07 15:21:39 +00:00
vitest.config.mts [lexical-eslint-plugin] Chore: update @lexical/eslint-plugin for better eslint 9+ support, finish jest to vitest migration (#8227) 2026-03-16 17:19:35 +00:00
vitest.setup.mts [*] Chore: Replace jest with vitest for unit tests (#7796) 2025-09-04 22:45:43 +00:00

Lexical

An extensible text editor framework that provides excellent reliability, accessibility and performance.

NPM Version NPM Downloads Build Status Discord Twitter Follow

Documentation | Getting Started | Playground | Gallery


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

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

Browser Version
Chrome 86+
Firefox 115+
Safari 15+
Edge 86+

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 © Meta Platforms, Inc.