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
- v0.32.1 by @etrepum in #7605
- [lexical][Breaking Change] Bug Fix: Change $copyNode to use afterCloneFrom by @etrepum in #7609
- [lexical-react] Chore: Remove confusing return value by @eliottvincent in #7607
- [lexical-code][lexical-markdown][lexical-playground] Feature: Add code diff highlighting by @jeromew in #7613
- [lexical-devtools-core] Bug Fix: Allow CustomPrintNodeFn to return undefined by @achaljhawar in #7619
- [lexical-playground] Bug Fix: Update alignment state for image selection by @kirandash in #7627
- Add in favor for to deprecated tag by @sofiane-dj in #7634
- [lexical-react] Chore: make ref types mutable by @findoo in #7633
- [lexical-headless-test] Enhance navigator environment check with object type and structure validation by @0xobedient in #7626
- Feature: $config protocol + NodeState registration/flattening by @etrepum in #7258
- [Lexical]Refactor: Change UnionToIntersection flow type by @lilshady in #7643
- [lexical-table] Bug Fix: Ignore SELECTION_INSERT_CLIPBOARD_NODES_COMMAND dispatched from child editors by @etrepum in #7637
- [lexical] Bug Fix: copy NodeState when splitting text nodes by @randal-atticus in #7641
- [lexical-devtools-core] Chore: add NodeState to TreeView by @randal-atticus in #7642
- [lexical-react] Bug Fix: handle DraggableBlockPlugin in scrollable editors by @randal-atticus in #7644
- [lexical-playground] Bug Fix: Allow deleting empty column layouts via backspace by @Lakshmanshankar in #7636
- [lexical] Bug Fix: allow same mutation listener fn to be registered to multiple nodes by @james-atticus in #7654
- [lexical-playground] [lexical-list] add ability to change ordered list start number by @achaljhawar in #7638
- [lexical] Bug Fix: Workarounds in $config protocol for loose inheritance by @etrepum in #7659
- [lexical-react] Bug Fix: aria-prohibited-attr violation on LexicalContentEditableElement by @so99ynoodles in #7647
- [lexical-website] Documentation Update: Update some doc links by @lilshady in #7660
- [lexical] Bug Fix: Workarounds for import json by @lilshady in #7661
- [lexical-website] Chore: Fix typo in transforms by @noamzaks in #7664
- [lexical-list] Bug Fix: Make tap target for checklists bigger so touch inputs register by @circlingthesun in #7655
- [lexical-clipboard] Inherit style when typing after pasting rich text by @achaljhawar in #7657
- [lexical-table] Bug Fix: Fix table selection for touch devices by @circlingthesun in #7656
- [lexical-playground] Chore: Fix AutocompleteNode importDOM warning by @etrepum in #7667
- [lexical-react] Bug Fix: LexicalMenu position menu immediately regression by @etrepum in #7669
- [lexical-playground] fix: close link popup when user clicks out of it by @achaljhawar in #7670
- [lexical] Bug Fix: LexicalNode.getType() fallback to $config protocol by @etrepum in #7671
New Contributors
- @achaljhawar made their first contribution in #7619
- @sofiane-dj made their first contribution in #7634
- @findoo made their first contribution in #7633
- @0xobedient made their first contribution in #7626
- @randal-atticus made their first contribution in #7641
- @Lakshmanshankar made their first contribution in #7636
- @so99ynoodles made their first contribution in #7647
- @noamzaks made their first contribution in #7664
Full Changelog: v0.32.1...v0.33.0