v0.33.0
facebook/lexicalv0.33.0Jul 4, 2025by etrepum
AI Summary
Lexical v0.33.0 is a monthly release featuring major new features including the $config protocol for simplified custom node creation, code diff highlighting, and improved accessibility with the role attribute preserved on readonly elements. The release also includes numerous bug fixes across Core, React, Table, List, and Playground components.
Key Highlights
- New $config protocol for creating custom nodes with automatic boilerplate generation and NodeState support
- Code diff highlighting added to the code editor
- NodeState now visible in DevTools TreeView for better debugging
- Added ability to change ordered list start number
- Improved clipboard behavior - inherits style of last pasted TextNode when typing after pasting rich text
Breaking Changes
- $copyNode(prevNode) now calls node.afterCloneFrom(prevNode), potentially affecting code that assumed this wouldn't be called
- role attribute no longer removed from readonly LexicalContentEditableElement for accessibility compliance - may require CSS adjustments
New Features
- $config protocol for streamlined custom node class creation with automatic static method generation
- Code diff highlighting feature
- NodeState registration and flattening support
- Command to change ordered list's start number
- Inherit style of last pasted TextNode after pasting rich text
- NodeState added to DevTools TreeView
- Larger tap targets for checklist items on touch devices
- Table selection now only occurs when dragging on touch devices
Full Release Notes
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](https://lexical.dev/docs/concepts/nodes#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 * v0.32.1 by @etrepum in https://github.com/facebook/lexical/pull/7605 * [lexical][Breaking Change] Bug Fix: Change $copyNode to use afterCloneFrom by @etrepum in https://github.com/facebook/lexical/pull/7609 * [lexical-react] Chore: Remove confusing return value by @eliottvincent in https://github.com/facebook/lexical/pull/7607 * [lexical-code][lexical-markdown][lexical-playground] Feature: Add code diff highlighting by @jeromew in https://github.com/facebook/lexical/pull/7613 * [lexical-devtools-core] Bug Fix: Allow CustomPrintNodeFn to return undefined by @achaljhawar in https://github.com/facebook/lexical/pull/7619 * [lexical-playground] Bug Fix: Update alignment state for image selection by @kirandash in https://github.com/facebook/lexical/pull/7627 * Add in favor for to deprecated tag by @sofiane-dj in https://github.com/facebook/lexical/pull/7634 * [lexical-react] Chore: make ref types mutable by @findoo in https://github.com/facebook/lexical/pull/7633 * [lexical-headless-test] Enhance navigator environment check with object type and structure validation by @0xobedient in https://github.com/facebook/lexical/pull/7626 * Feature: $config protocol + NodeState registration/flattening by @etrepum in https://github.com/facebook/lexical/pull/7258 * [Lexical]Refactor: Change UnionToIntersection flow type by @lilshady in https://github.com/facebook/lexical/pull/7643 * [lexical-table] Bug Fix: Ignore SELECTION_INSERT_CLIPBOARD_NODES_COMMAND dispatched from child editors by @etrepum in https://github.com/facebook/lexical/pull/7637 * [lexical] Bug Fix: copy NodeState when splitting text nodes by @randal-atticus in https://github.com/facebook/lexical/pull/7641 * [lexical-devtools-core] Chore: add NodeState to TreeView by @randal-atticus in https://github.com/facebook/lexical/pull/7642 * [lexical-react] Bug Fix: handle DraggableBlockPlugin in scrollable editors by @randal-atticus in https://github.com/facebook/lexical/pull/7644 * [lexical-playground] Bug Fix: Allow deleting empty column layouts via backspace by @Lakshmanshankar in https://github.com/facebook/lexical/pull/7636 * [lexical] Bug Fix: allow same mutation listener fn to be registered to multiple nodes by @james-atticus in https://github.com/facebook/lexical/pull/7654 * [lexical-playground] [lexical-list] add ability to change ordered list start number by @achaljhawar in https://github.com/facebook/lexical/pull/7638 * [lexical] Bug Fix: Workarounds in $config protocol for loose inheritance by @etrepum in https://github.com/facebook/lexical/pull/7659 * [lexical-react] Bug Fix: aria-prohibited-attr violation on LexicalContentEditableElement by @so99ynoodles in https://github.com/facebook/lexical/pull/7647 * [lexical-website] Documentation Update: Update some doc links by @lilshady in https://github.com/facebook/lexical/pull/7660 * [lexical] Bug Fix: Workarounds for import json by @lilshady in https://github.com/facebook/lexical/pull/7661 * [lexical-website] Chore: Fix typo in transforms by @noamzaks in https://github.com/facebook/lexical/pull/7664 * [lexical-list] Bug Fix: Make tap target for checklists bigger so touch inputs register by @circlingthesun in https://github.com/facebook/lexical/pull/7655 * [lexical-clipboard] Inherit style when typing after pasting rich text by @achaljhawar in https://github.com/facebook/lexical/pull/7657 * [lexical-table] Bug Fix: Fix table selection for touch devices by @circlingthesun in https://github.com/facebook/lexical/pull/7656 * [lexical-playground] Chore: Fix AutocompleteNode importDOM warning by @etrepum in https://github.com/facebook/lexical/pull/7667 * [lexical-react] Bug Fix: LexicalMenu position menu immediately regression by @etrepum in https://github.com/facebook/lexical/pull/7669 * [lexical-playground] fix: close link popup when user clicks out of it by @achaljhawar in https://github.com/facebook/lexical/pull/7670 * [lexical] Bug Fix: LexicalNode.getType() fallback to $config protocol by @etrepum in https://github.com/facebook/lexical/pull/7671 ## New Contributors * @achaljhawar made their first contribution in https://github.com/facebook/lexical/pull/7619 * @sofiane-dj made their first contribution in https://github.com/facebook/lexical/pull/7634 * @findoo made their first contribution in https://github.com/facebook/lexical/pull/7633 * @0xobedient made their first contribution in https://github.com/facebook/lexical/pull/7626 * @randal-atticus made their first contribution in https://github.com/facebook/lexical/pull/7641 * @Lakshmanshankar made their first contribution in https://github.com/facebook/lexical/pull/7636 * @so99ynoodles made their first contribution in https://github.com/facebook/lexical/pull/7647 * @noamzaks made their first contribution in https://github.com/facebook/lexical/pull/7664 **Full Changelog**: https://github.com/facebook/lexical/compare/v0.32.1...v0.33.0