lexical

0.48.0

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
facebook/lexical

What's New

v0.48.0

2026-07-16T19:16:13Z

v0.48.0 is a maintenance release focused on bug fixes across Markdown, tables, lists, links, and selection. It's headlined by a fix for a v0.46.0 regression that broke native text drag-and-drop (#8842) and a couple of notable security hardening fixes. It also adds a handful of new features, including an MdastHtmlExtension with examples for authoring custom Markdown constructs (collapsibles, kbd, alerts, footnotes), a customizable Yjs shared-type root name for collaborative editing, and new table row manipulation helpers.

New APIs & Features

Notable Fixes

Drag & drop (fix for v0.46.0 regression)

  • Don't cancel dragover for text drags, so native drops work again (#8842)

Security

  • LinkNode.sanitizeUrl() now fails closed on unparseable URLs, preventing a potential XSS vector (#8846)
  • Fixed a serialize-javascript dependency vulnerability (#8803)

Markdown & code

  • Roundtrip overlapping inline formats correctly through mdast/Markdown (#8825)
  • Force re-tokenization after an async language load so highlighting appears once the grammar is ready (#8830)

Tables

  • Auto-scroll while drag-selecting cells past the visible edge (#8822)
  • Enable table copy in read-only mode (#8845)

Lists & character limit

  • Backspace at the start of a list item now outdents or converts to a paragraph (#8829)
  • Merge adjacent OverflowNodes in useCharacterLimit (#8831)
  • Count block separators when wrapping character-limit overflow (#8840)

Links & selection

  • Disable link opening for disabled autolinks (#8839)
  • Skip scrollIntoViewIfNeeded when the selection rect is above the editor, fixing a Safari RTL caret jump (#8848)

What's Changed

  • [lexical-mdast][lexical-markdown] Bug Fix: Roundtrip overlapping inline formats by @etrepum in #8825
  • [lexical-table][lexical-playground] Bug Fix: Auto-scroll while drag-selecting cells past the visible edge by @JohnJunior in #8822
  • [lexical-code-shiki] Bug Fix: force re-tokenize after async language load by @ochevallier in #8830
  • [lexical-react] Bug Fix: Merge adjacent OverflowNodes in useCharacterLimit by @mayrang in #8831
  • Open playground links in a new tab by @potatowagon in #8837
  • [lexical-rich-text][lexical-plain-text] Bug Fix: don't cancel dragover for text drags so native drops work again by @etrepum in #8842
  • [lexical-link] Bug Fix: disable link opening for disabled autolink in… by @ochevallier in #8839
  • [lexical-table] Feature: Add $moveTableRow function & Add missing export for $unmergeCellNode by @hamo-o in #8833
  • [lexical-list] Bug Fix: Backspace at start of list item outdents or converts to paragraph by @mayrang in #8829
  • [lexical-yjs][lexical-react] Feature: Customizable Yjs shared-type root name by @mayrang in #8841
  • [lexical] Chore: Fix serialize-javascript package dependency vulnerability by @vijayojha89 in #8803
  • [lexical-react] Bug Fix: Count block separators in character limit overflow wrapping by @mayrang in #8840
  • Fix: fail closed in LinkNode.sanitizeUrl() on unparseable URLs (XSS) by @xiezhenjia-meta in #8846
  • [lexical-extension][lexical-mdast][dev-mdast-editor-example] Feature: Add MdastHtmlExtension and Markdown custom-construct examples (collapsible, kbd, alerts, footnotes) by @etrepum in #8826
  • [lexical-react][lexical-table] Bug Fix: Enable table copy in read-only mode by @mayrang in #8845
  • Skip scrollIntoViewIfNeeded when the selection rect is above the editor (Safari RTL caret jump) by @jeremy in #8848

New Contributors

Full Changelog: v0.47.0...v0.48.0

Lexical

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

NPM Version NPM Downloads Build Status Discord

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

Description

  • Swift Tools
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Aug 18 2026 10:06:53 GMT-0900 (Hawaii-Aleutian Daylight Time)