v0.40.0

facebook/lexicalv0.40.0Feb 2, 2026by etrepum

AI Summary

Monthly release primarily focusing on bug fixes and infrastructure improvements including the transition from npm to pnpm. Includes major markdown parsing refactoring and utility reorganization.

Key Highlights

  • Monorepo transition from npm to pnpm
  • Major markdown parsing fixes and refactoring
  • Utilities moved from @lexical/utils to lexical core package
  • RootNode.getTextContent() cache coherency bug fixed
  • Table selection improvements for merged cells
  • New playground features: table resize handle color, draggable block handles, hover actions, column sort

New Features

  • Transition from npm to pnpm for monorepo management
  • Fix infinite transform loop in AutoLinkPlugin
  • Toggle links with nested children
  • Fix selection issue from list transform on linebreak
  • Treat whitespace-only list items as empty when pressing Enter
  • Fix incorrect format tag placement at link boundaries
  • Replace regex-based format matching in markdown
  • Fix format removed on multi selection after replace
  • Refactor RootNode.__cachedText computation for coherency
  • Fix Ctrl+A to select all cells in table with merged cells
  • Fix inconsistent multi-cell selection in 2x2 tables
  • Clear remote cursor immediately on collaborator refresh
  • Fix cursor disappearing in Firefox when dragging blocks
  • Expose onReposition prop on SelectionAlwaysOnDisplay
  • Color table resize handle
  • Draggable block handle gliding effect
  • New Table Hover Actions Plugin
  • Column Sort for Basic Table
  • Add button shows the component picker
  • Prevent code block line wrapping to keep line number

Full Release Notes

v0.40.0 is a monthly release primarily focusing on bug fixes and infrastructure such as the move from npm to pnpm.

Some very notable changes include:
- Some major fixes and refactoring to markdown parsing #8093 #8085
- Several of the most common utilities were moved from @lexical/utils to lexical (`mergeRegister`, `addClassNames`, `removeClassNames`) #8106
- A cache coherency bug in `RootNode.getTextContent()` was fixed #8099

## Highlights

Monorepo:
- 🧹  #8035 Chore: Transition from npm to pnpm (also #8045 #8048 #8050 #8051 #8054 #8106) 

Link:
- βœ… #8070 Fix: Fix infinite transform loop in AutoLinkPlugin
- βœ… #8078 Fix: Toggle links with nested children

List:
- βœ… #8049 Fix: fix selection issue from list transform on linebreak
- βœ… #8068 Fix: Treat whitespace-only list items as empty when pressing Enter

Markdown:
- βœ… #8085 Fix: Fix incorrect format tag placement at link boundaries
- βœ… #8093 Fix: Replace regex-based format matching

Core:
- βœ… #8069 Fix: format removed on multi selection after replace
- βœ… #8099 Fix: Refactor RootNode.__cachedText computation for coherency

Table:
- βœ… #8076 Fix: Fix Ctrl+A to select all cells in table with merged cells
- βœ… #8081 Fix: Fix inconsistent multi-cell selection in 2x2 tables
- 🧹  #8088 Chore: Fix test for nested table pasting

Utils:
- 🧹 #8106 Chore: Move functions `mergeRegister`, `addClassNames`, `removeClassNames` to lexical package

React:
- βœ… #8062 Fix: Clear remote cursor immediately on collaborator refresh
- βœ… #8065 Fix: Fix cursor disappearing in Firefox when dragging blocks
- βœ… #8071 Chore: Expose onReposition prop on SelectionAlwaysOnDisplay

Playground:
- πŸ†•  #8043 Feature: Color table resize handle
- πŸ†•  #8042 Feature: Draggable block handle gliding effect
- βœ… #8052 Fix: Draggable handle and dropdown CSS zoom fix 
- πŸ†• #8057 Feature: New Table Hover Actions Plugin
- πŸ†• #8060 Feature: Column Sort for Basic Table
- πŸ†• #8066 Feature: Add button shows the component picker
- βœ… #8087 Fix: Prevent code block line wrapping to keep line number

## What's Changed
* v0.39.0 by @etrepum in https://github.com/facebook/lexical/pull/8021
* Chore: Add an ignore-previously-published arg to the publish action by @etrepum in https://github.com/facebook/lexical/pull/8023
* Chore: Update examples for v0.39.0 by @etrepum in https://github.com/facebook/lexical/pull/8024
* Agent documentation by @zurfyx in https://github.com/facebook/lexical/pull/8031
* README tweaks by @zurfyx in https://github.com/facebook/lexical/pull/8033
* npm -> pnpm by @zurfyx in https://github.com/facebook/lexical/pull/8035
* Nightlies publish param by @zurfyx in https://github.com/facebook/lexical/pull/8045
* Nightlies fix frozen lockfile by @zurfyx in https://github.com/facebook/lexical/pull/8048
* [lexical-playground]: Color table resize handle by @ivailop7 in https://github.com/facebook/lexical/pull/8043
* Use PNPM workspace feature for publish by @zurfyx in https://github.com/facebook/lexical/pull/8050
* Override workspace with actual version on npm/ bundle by @zurfyx in https://github.com/facebook/lexical/pull/8051
* [lexical-playground]: Draggable block handle gliding effect by @ivailop7 in https://github.com/facebook/lexical/pull/8042
* Allow publish to run on detached head by @zurfyx in https://github.com/facebook/lexical/pull/8054
* [lexical-list] Bug Fix: fix selection issue from list transform on linebreak by @dizsmek in https://github.com/facebook/lexical/pull/8049
* [docs] Documentation Update: Fix incorrect and broken links in README by @h8f1z in https://github.com/facebook/lexical/pull/8055
* [lexical-playground]: Draggable handle and dropdown CSS zoom fix by @ivailop7 in https://github.com/facebook/lexical/pull/8052
* [lexical-playground]: New Table Hover Actions Plugin by @ivailop7 in https://github.com/facebook/lexical/pull/8057
* [lexical-playground]: Column Sort for Basic Table by @ivailop7 in https://github.com/facebook/lexical/pull/8060
* [lexical-react] Bug Fix: Clear remote cursor immediately on collaborator refresh by @aldoprogrammer in https://github.com/facebook/lexical/pull/8062
* [lexical-playground] Add button shows the Component Picker by @ivailop7 in https://github.com/facebook/lexical/pull/8066
* [lexical][@lexical/react] Bug Fix: Fix cursor disappearing in Firefox when dragging blocks by @aldoprogrammer in https://github.com/facebook/lexical/pull/8065
* [lexical] Bug Fix: format removed on multi selection after replace by @kimseongyu in https://github.com/facebook/lexical/pull/8069
* [lexical-list] Bug Fix: Treat whitespace-only list items as empty when pressing Enter by @mike-atticus in https://github.com/facebook/lexical/pull/8068
* [lexical][@lexical/link] Bug Fix: Fix infinite transform loop in AutoLinkPlugin by @aldoprogrammer in https://github.com/facebook/lexical/pull/8070
* [lexical][@lexical/table] Fix Ctrl+A to select all cells in table with merged cells #8074 by @aldoprogrammer in https://github.com/facebook/lexical/pull/8076
* [lexical-react] Chore: Expose onReposition prop on SelectionAlwaysOnDisplay by @takuyakanbr in https://github.com/facebook/lexical/pull/8071
* [lexical-link] Bug Fix: Toggle links with nested children by @patrick-atticus in https://github.com/facebook/lexical/pull/8078
* [lexical-markdown] Bug Fix: Fix incorrect format tag placement at link boundaries by @kimseongyu in https://github.com/facebook/lexical/pull/8085
* [lexical][@lexical/table] Bug Fix: Fix inconsistent multi-cell selection in 2x2 tables by @aldoprogrammer in https://github.com/facebook/lexical/pull/8081
* [lexical-table] Chore: Fix test for nested table pasting by @randal-atticus in https://github.com/facebook/lexical/pull/8088
* Fix(Playground): Prevent code block line wrapping to keep line number… by @Sa-Te in https://github.com/facebook/lexical/pull/8087
* [lexical-markdown] Bug Fix: Replace regex-based format matching with … by @kimseongyu in https://github.com/facebook/lexical/pull/8093
* [lexical] Bug Fix: Refactor RootNode.__cachedText computation for coherency by @etrepum in https://github.com/facebook/lexical/pull/8099
* [lexical][lexical-utils] Chore: Use workspace:* for monorepo versions and fix some cyclic dependencies by @etrepum in https://github.com/facebook/lexical/pull/8106

## New Contributors
* @dizsmek made their first contribution in https://github.com/facebook/lexical/pull/8049
* @h8f1z made their first contribution in https://github.com/facebook/lexical/pull/8055
* @aldoprogrammer made their first contribution in https://github.com/facebook/lexical/pull/8062
* @kimseongyu made their first contribution in https://github.com/facebook/lexical/pull/8069
* @Sa-Te made their first contribution in https://github.com/facebook/lexical/pull/8087

**Full Changelog**: https://github.com/facebook/lexical/compare/v0.39.0...v0.40.0