facebook/lexical
 Watch   
 Star   
 Fork   
21 days ago
lexical

v0.34.0

v0.34.0 is a monthly release with several bug fixes and a new experimental Shiki based code highlighter engine for @lexical/code (the existing prismjs highlighter is still the default)

Highlights

Core:

  • ✅ #7724 Fix trigger of reconciliation on nested editor.read
  • ✅ #7725 Clamp DOM selection offsets to valid lexical TextNode offsets in $internalResolveSelectionPoint

Code:

  • 🆕 #7662 Experimental Shiki support for code highlighting

Selection:

  • ✅ #7686 Correct backward inversion for RTL

Utils:

  • ✅ #7737 Backwards selection was not being retained

React:

  • ✅ #7705 Clean up old mouseup events from context menu
  • 🆕 #7697 Context Menu icons
  • ✅ #7723 Prevent race condition in CollaborationPlugin during rapid mount/unmount cycles

Playground:

  • ✅ #7693 Image links lose link state when dragged
  • 🆕 #7719 Parse font sizes in pt as well as px in parseAllowedFontSize
  • ✅ #7707 DateTime plugin

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.33.1...v0.34.0

2025-07-11 03:49:24
lexical

v0.33.1

This is a patch release with a fix for the new $config flat NodeState API

Highlights

Core

  • ✅ #7683 Implement missing updateJSON support for $config flat NodeState
  • 🆕 #5829 RangeSelection.setFormat setter

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.33.0...v0.33.1

2025-07-04 05:42:19
lexical

v0.33.0

This is a monthly release with some major new features and lots of bug fixes

Breaking Changes

$copyNode(prevNode) now calls node.afterCloneFrom(prevNode) #7609

If you have code that assumes that newNode.afterCloneFrom(prevNode) will not be called as a result of $copyNode(prevNode), and would no longer work if it was, then it will need some refactoring. This is a very unlikely scenario.

role no longer removed from readonly LexicalContentEditableElement #7647

The role attribute is no longer removed from readonly LexicalContentEditableElement for better accessibility compliance. This may require application and/or CSS changes in rare cases.

New APIs

$config protocol #7258

There's a new protocol for creating new node classes, that's more concise, automatically generates the boilerplate for the static methods (getType, clone, importJSON) and has additional features for NodeState.

See the Creating custom nodes with $config and NodeState documentation.

Highlights

Core

  • 🆕 #7258 $config protocol + NodeState registration/flattening (also #7659 #7661 #7667 #7671)
  • ✅ #7641 Copy NodeState in TextNode.splitText
  • ✅ #7654 Allow the same mutation listener function to be registered to multiple nodes

Clipboard

  • 🆕 #7657 Inherit the style of the last pasted TextNode in the block after pasting rich text

Code

  • 🆕 #7613 Code diff highlighting

Devtools

  • 🆕 #7642 Add NodeState to TreeView

List

  • 🆕 #7638 Add a command to change an ordered list's start number
  • ✅ #7655 Make tap target for checklists bugger for touch input

React

  • ✅ #7633 Make ref types mutable
  • ✅ #7644 Handle DraggableBlockPlugin in scrollable editors
  • ✅ #7647 Do not remove role from read-only LexicalContentEditableElement
  • ✅ #7669 Fix an issue with dangling div portals with non-empty style in LexicalMenu (regressed in v0.25)

Table

  • ✅ #7637 Ignore SELECTION_INSERT_CLIPBOARD_NODES_COMMAND dispatched from child editors
  • ✅ #7656 Table selection now only occurs when dragging on touch devices

Playground

  • ✅ #7627 Update alignment state for image selection
  • ✅ #7636 Allow deleting an empty column layout via backspace
  • ✅ #7670 Close FloatingLinkEditor popup when user clicks out of it

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.32.1...v0.33.0

2025-06-05 05:17:13
lexical

v0.32.1

This is an ad-hoc patch release to include #7602 - which fixes an issue that could corrupt a document if a TabNode was at the anchor or focus of a selection when text is inserted under certain circumstances.

Highlights

Core

  • ✅ #7602 Treat all TabNode as if they are in token mode
  • ✅ #7579 Firefox now handles Select All (Ctrl+A) the same way as other browsers

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.32.0...v0.32.1

2025-06-03 11:19:29
lexical

v0.32.0

Highlights

Core

  • ✅ #7544 2 Tabs on single line selection should indent
  • 🆕 #7573 Feature: Improve Tab/Indent/Outdent to match VSCode
  • ✅ #7568 unbulleting an image doesn't work #5698 ([lexical-selection][lexical-playground])
  • 🆕 #7593 Type: Add flow export type for LexicalUpdateTags

Playground

  • ✅ #7556 Change list, strikethrough and quoteblock shortcuts to match Google Docs for Windows compatibility
  • ✅ #7545 Support Apple Pencil
  • 🆕 #7567 Chore: source command priority from package
  • ✅ #7572 Preserve row striping in frozen table columns
  • ✅ #7568 unbulleting an image doesn't work #5698
  • ✅ #7558 Made checklist icon fully scalable, clickable, and properly spaced at large font sizes
  • 🆕 #7590 Refactor: simplify ExcalidrawModal
  • 🆕 #7509 FloatingUI Context Menu
  • 🆕 #7596 Chore: source command priority from package

Markdown

  • ✅ #7560 Link Transformer URL Protocol Han…
  • ✅ #7564 Prevent transform from removing nodes if the replace function returns false
  • ✅ #7594 Don't select nodes when importing

React

  • ✅ #7589 page freezes when typing a link in an overflow area
  • 🆕 #7584 Feature: allow whitespaces in search keyword in useBasicTypeaheadTriggerMatch

Website

  • ✅ #7569 fix documentation typos
  • ✅ #7574 Fix docusaurus build by adding removeLegacyPostBuildHeadAttribute flag

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.31.2...v0.32.0

2025-05-21 01:46:28
lexical

v0.31.2

Patch release for #7549, this is a bug fix release

Highlights

Core:

  • ✅ #7549 Fix infinite loop in indexPath
  • ✅ #7536 Do not export empty textAlign styles

Code:

  • ✅ #7538 Allow code highlighter to be used in headless mode

Markdown:

  • ✅ #7539 Do not export auto-link nodes

Playground:

  • ✅ #7534 Use babel MatchPatterns that work correctly on Windows

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.31.1...v0.31.2

2025-05-12 01:01:22
lexical

v0.31.1

This is a patch release primarily to address a dev tools build regression (#7522)

Highlights

Rich Text

  • ✅ #7516 Backspace now only dedents at the start of first descendant of an indented block

List

  • ✅ #7504 Marker styles are now inherited on indent

Markdown

  • ✅ #7499 Link transformer now explicitly adds a protocol to URLs

React

  • 🆕 #7520 useBasicTypeaheadTriggerMatch punctuation regex fragment is now configurable

Table

  • ✅ #7498 TableNode DOM import now supports frozen rows and columns

Playground

  • ✅ #7506 LexicalTypeaheadMenuPlugin is now positioned correctly when scrolled
  • ✅ #7508 Change text capitalization keyboard shortcuts on macOS to avoid conflicts
  • ✅ #7520 Emoji typeahead search now permits underscore and dashes

Dev Tools

  • ✅ #7522 Vite configuration fix for devtools build

Docs

  • 🆕 #7294 New NodeState documentation and example

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.31.0...v0.31.1

2025-04-30 13:08:09
lexical

v0.31.0

Highlights

Core

  • ✅ #7439 Correct caret movement in vertical-rl writing mode
  • ✅ #7450 Migrate string literals to update tag constants
  • ✅ #7471 Chore: Update sveltejs dependency
  • ✅ #7479 Revert Enter command to use inexact matching
  • ✅ #7481 Update KEY_ENTER_COMMAND API docs Website
  • 🆕 #7442 Improve createCommand developer experience
  • 🆕 #7441 Document and export common update tags
  • 🆕 #7448 Documentation Update: Add detailed guides for key and clone concepts

Playground

  • 🆕 #7464 Add keyboard shortcut for comments
  • ✅ #7462 Stabilize text format dropdown width in toolbar
  • ✅ #7478 Disable flaky "Can expand table to fit content when pasting table into table" in collab
  • 🆕 #7482 Refactor autolink tests for reliability

React

  • 🆕 #7477 Make check for entity boundary configurable in LexicalTypeaheadMenuPlugin
  • ✅ #7488 Re-render tables when the hasHorizontalScroll setting is changed
  • ✅ #7486 Support custom cursor sync in CollaborationPlugin

Collab

  • 🆕 #7453 Simplify removeFromParent internal operations

Table

  • ✅ #7447 Handle backspace deletion of tables with merged cells

Markdown

  • ✅ #7476 Add import support for backslash escape sequences

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.30.0...v0.31.0

2025-04-08 00:01:35
lexical

v0.30.0

Breaking Changes

Listeners are now always called with the editor they were registered to

#7378 changed the internal updateEditorSync implementation to always use the correct active editor when triggering a listener. This only affects how nested editors delegate their events to listeners attached to a parent editor. If you have listeners attached to the parent editor that expect to be called with the context of the nested editor then you'll have to either also attach the listener to the nested editor, or change the behavior to check the editor argument of the command listener to see which editor the command was originally dispatched to.

Import of markdown blocks preserves separation with shouldPreserveNewLines

#7386 changed the behavior of the markdown import's paragraph merging logic to align with GitHub's markdown editor behavior for list and common markdown formatting expectations when shouldPreserveNewlines is true.

Markdown encoding uses HTML entities to represent leading and trailing whitespace

#7400 changed the markdown encoder to replace leading or trailing whitespace of formatted strings with the corresponding HTML entities

Highlights

Core

  • ✅ #7378 Ensure updateEditorSync is always synchronous and use it when triggering listeners
  • ✅ #7393 Fix right and up arrow key navigation with decorator nodes
  • ✅ #7401 Clone the selection and use $setSelection instead of assigning dirty to true directly
  • ✅ #7397 Change $getTextNodeOffset invariant to warn in prod (error in __DEV__)
  • ✅ #7412 Fix forward line deletion when using control+K
  • 🆕 #7438 Add text-transform styles to exported HTML

Rich Text

  • ✅ #7411 Prevent indentation from becoming negative

Collab

  • ✅ #7330 Don't sync ElementNode __dir property
  • ✅ #7398 Fix scroll position getting changed when someone else makes a change in collab

Markdown

  • ✅ #7386 Preserve paragraph separation after block elements
  • ✅ #7395 Prevent Markdown shortcuts from applying to code-formatted text
  • ✅ #7400 Replace whitespace with code point when the string has leading and trailing whitespaces

List

  • ✅ #7380 Empty list item type change
  • ✅ #7420 Enforce strict list indentation
  • 🆕 #7429 Export registerCheckList

Link

  • ✅ #7366 Add support for image links via NodeSelection

Devtools

  • ✅ #7403 Update debug view to show KEY_ESCAPE_COMMAND immediately

React

  • 🆕 #7404 Add option to disable first item auto-selection in menus

Table

  • 🆕 #7408 Improve logic for pasting table into table
  • 🆕 #7415 Rename and deprecate some table utils

Playground

  • 🆕 #7384 Clear block ElementNode formatting along with TextNode
  • 🆕 #7417 Clear formatting should also clear any indent/outdent if applied
  • ✅ #7368 Remove shared imports from playground for easier re-use
  • ✅ #7388 Use natural dimensions for inherited image size
  • ✅ #7405 Fix floating toolbar position for end-aligned text
  • ✅ #7431 Fix immediate broken image display on load failure

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.29.0...v0.30.0

2025-03-25 14:15:40
lexical

v0.29.0

Breaking Changes

https://github.com/facebook/lexical/pull/7351 : Only select RootNode on removal of last child if there was an existing selection https://github.com/facebook/lexical/pull/7353: Support escaping markdown characters https://github.com/facebook/lexical/pull/7357: Refactor: LexicalNestedComposer add skipEditableListener prop and deprecate initialNodes prop and implicit namespace setting https://github.com/facebook/lexical/pull/7372: Set tableFrozenColumn and tableFrozenRow classes only on the scrollable table wrapper

Highlights

React: 🆕 https://github.com/facebook/lexical/pull/7357: LexicalNestedComposer add skipEditableListener prop and deprecate initialNodes prop and implicit namespace setting

Table: ✅https://github.com/facebook/lexical/pull/7372: Set tableFrozenColumn and tableFrozenRow classes only on the scrollable table wrapper ✅https://github.com/facebook/lexical/pull/7316: Add fallback selection to InsertTableCommand

Core editor: ✅https://github.com/facebook/lexical/pull/7351: Only select RootNode on removal of last child if there was an existing selection ✅https://github.com/facebook/lexical/pull/7354: Ignore input event from inside decorators

Markdown: 🆕 https://github.com/facebook/lexical/pull/7353: Feature: Support escaping markdown characters

Playground: 🆕 https://github.com/facebook/lexical/pull/7352 : Chore: Improve accessibility of DraggableBlockPlugin add block button ✅https://github.com/facebook/lexical/pull/7334: Table action menu visibility with cell overflow ✅https://github.com/facebook/lexical/pull/7362: Fix equation rendering in Safari 🆕 https://github.com/facebook/lexical/pull/7371: Chore: Update excalidraw to v0.18.0 Doc: ✅https://github.com/facebook/lexical/pull/7365: Update react.md, fix typo

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.28.0...v0.29.0