v0.20.2

facebook/lexicalv0.20.2Dec 1, 2024by potatowagon

AI Summary

A maintenance release that includes the same highlights as v0.21.0, including experimental scrollable tables and the deprecation of `$nodesOfType`, along with various bug fixes for React, tables, and selection handling.

Key Highlights

  • Experimental scrollable tables with `getDOMSlot` API
  • Deprecation of `$nodesOfType` function
  • Fixes for table selection issues and keyboard navigation
  • Bug fixes for React `ContentEditable` types and initial value function calls
  • Accessibility fixes for ARIA attributes

Breaking Changes

  • Deprecate $nodesOfType function

New Features

  • Scrollable tables with experimental getDOMSlot API

Full Release Notes

# Highlights

Highlights since [v0.20.0](https://github.com/facebook/lexical/releases/tag/v0.20.0)

Core editor:
-  πŸ†• skipInitialization defaults to false for registerMutationListener
https://github.com/facebook/lexical/pull/6857 

- πŸ†• Deprecate $nodesOfType function
https://github.com/facebook/lexical/pull/6855

- βœ… Fix backspace bug when deleting nodes with canInsertTextAfter set to false
https://github.com/facebook/lexical/pull/6268 

- πŸ†• Add missing flow types for utils
https://github.com/facebook/lexical/pull/6841

- βœ… Fix: Add feature detection to calculateZoomLevel
https://github.com/facebook/lexical/pull/6864 

- βœ… Fix: Allow setEditorState to work correctly inside of an update (Fixes Autocomplete plugin)
https://github.com/facebook/lexical/pull/6876 

React:

- βœ… Fix: Prevent initial value fn to be called on rerender
https://github.com/facebook/lexical/pull/6835/ 

- πŸ†• ContentEditable Props type rename to ContentEditableProps
https://github.com/facebook/lexical/pull/6837/

Link:

- πŸ†• Add missing flow types
https://github.com/facebook/lexical/pull/6833/

Table:
- πŸ†• Feature: Scrollable tables with experimental getDOMSlot API
https://github.com/facebook/lexical/pull/6759 
- βœ… Fix down arrow key handling in TableObserver
https://github.com/facebook/lexical/pull/6839 
- βœ… Fix Resolve table selection issue when the mouse crosses over a portal
https://github.com/facebook/lexical/pull/6834 
- βœ… Fix get table-cell background selection color from a class 
https://github.com/facebook/lexical/pull/6658
- βœ… Fix left arrow key handling for table selection
https://github.com/facebook/lexical/pull/6875 
- βœ… Fix table tab navigation
https://github.com/facebook/lexical/pull/6880 
- βœ… Fix scrollable table exportDOM
https://github.com/facebook/lexical/pull/6884 

i8n: 

- βœ… Fix: workaround for Korean IME issue on iOS
https://github.com/facebook/lexical/pull/6819 

A11y:

- βœ… Fix: Aria attributes for ContentEditable are ignored
https://github.com/facebook/lexical/pull/6814 

Mention:

- πŸ†• Mention nodes are no longer spellchecked
https://github.com/facebook/lexical/pull/6788/ 

List:

- βœ… Fix: Handle appending inline element nodes in ListNode.append
https://github.com/facebook/lexical/pull/6791

Mark:

- βœ… Fix: Don’t deep copy mark node ids in clone to prevent redundant change detection in syncPropertiesFromYjs
https://github.com/facebook/lexical/pull/6810 

Selection:
- πŸ†• New plugin to retain selection: SelectionAlwaysOnDisplay plugin
https://github.com/facebook/lexical/pull/6872 

- βœ… Fix: positionNodeOnRange fixes
https://github.com/facebook/lexical/pull/6873

## What's Changed
* v0.20.0 by @etrepum in https://github.com/facebook/lexical/pull/6809
* [lexical-mark] Bug Fix: Stop MarkNode __ids array deep copy in clone by @ebads67 in https://github.com/facebook/lexical/pull/6810
* [lexical-list] Bug Fix: Handle appending inline element nodes in ListNode.append by @amanharwara in https://github.com/facebook/lexical/pull/6791
* Mention nodes shouldn't be spellcheck'd :) by @sevki in https://github.com/facebook/lexical/pull/6788
* Fix: Aria attributes for ContentEditable are ignored by @vantage-ola in https://github.com/facebook/lexical/pull/6814
* [lexical-rich-text][lexical-plain-text] workaround for Korean IME issue on iOS by @2wheeh in https://github.com/facebook/lexical/pull/6819
* [lexical][lexical-table] Feature: Scrollable tables with experimental getDOMSlot API by @etrepum in https://github.com/facebook/lexical/pull/6759
* [lexical-examples] Chore: Add DOMExportOutputMap type to the exportMap by @Kingscliq in https://github.com/facebook/lexical/pull/6827
* Link flow types by @zurfyx in https://github.com/facebook/lexical/pull/6833
* Prevent initial value fn to be called on rerender by @fantactuka in https://github.com/facebook/lexical/pull/6835
* [lexical-table] Bug Fix: Fix down arrow key handling in TableObserver by @etrepum in https://github.com/facebook/lexical/pull/6839
* [lexical-link] Test:  Removing link from node(children) by @vantage-ola in https://github.com/facebook/lexical/pull/6817
* [lexical-react] Fix(lexical-react): ContentEditable props type rename by @ivaaaaann in https://github.com/facebook/lexical/pull/6837
* [lexical-utils] Bug Fix: Add missing Flow type declarations by @hadiham in https://github.com/facebook/lexical/pull/6841
* Table Action Menu - fix UI issue with Merge Cells item by @umaranis in https://github.com/facebook/lexical/pull/6830
* [*] Chore: npm upgrade cross-spawn by @potatowagon in https://github.com/facebook/lexical/pull/6848
* [lexical-link] Test: Appending inline element nodes to ListNode  by @Shopiley in https://github.com/facebook/lexical/pull/6826
* [Lexical] Bug Fix: backspace bug when deleting nodes with `canInsertTextAfter` set to false by @dani-lp in https://github.com/facebook/lexical/pull/6268
* Feature: Deprecate $nodesOfType function by @Sachin-Mahato in https://github.com/facebook/lexical/pull/6855
* [__tests__] npm upgrade cross-spawn by @potatowagon in https://github.com/facebook/lexical/pull/6856
* [Lexical] Chore: Update default skipInitialization to false for registerMutationListener by @Shopiley in https://github.com/facebook/lexical/pull/6857
* [lexical-table] Bug Fix: Resolve table selection issue when the mouse crosses over a portal by @etrepum in https://github.com/facebook/lexical/pull/6834
* [lexical-table] Bug Fix: get table-cell background selection color from a class by @hamza221 in https://github.com/facebook/lexical/pull/6658
* [lexical-selection] Bug Fix: Wrong selection type in $setBlocksType by @lytion in https://github.com/facebook/lexical/pull/6867
* Add Documentation for  RootNode's semantic and use case by @citruscai in https://github.com/facebook/lexical/pull/6869
* [lexical-utils] Bug Fix: Add feature detection to calculateZoomLevel by @etrepum in https://github.com/facebook/lexical/pull/6864
* [lexical-playground] Bug Fix: autocomplete format before and after insertion by @bedre7 in https://github.com/facebook/lexical/pull/6845
* [lexical-playground] Bug Fix: Preserve the selection using the link editor from a table by @etrepum in https://github.com/facebook/lexical/pull/6865
* Allow passing params to run-all by @zurfyx in https://github.com/facebook/lexical/pull/6874
* Add SelectionAlwaysOnDisplay plugin by @zurfyx in https://github.com/facebook/lexical/pull/6872
* positionNodeOnRange fixes by @zurfyx in https://github.com/facebook/lexical/pull/6873
* [lexical-table] Bug Fix: Fix left arrow key handling for table selection by @etrepum in https://github.com/facebook/lexical/pull/6875
* [lexical-playground] Fix: Hidden comment button on narrow screens or vertical monitors by @vantage-ola in https://github.com/facebook/lexical/pull/6871
* [lexical-playground] Feature: Highlight special strings with format by @citruscai in https://github.com/facebook/lexical/pull/6860
* [lexical-table] Bug Fix: Fix table tab navigation by @etrepum in https://github.com/facebook/lexical/pull/6880
* [lexical-table] Bug Fix: Fix scrollable table exportDOM by @etrepum in https://github.com/facebook/lexical/pull/6884
* v0.20.1 by @potatowagon in https://github.com/facebook/lexical/pull/6887
* [lexical-playground] Fix CSS property by @ivailop7 in https://github.com/facebook/lexical/pull/6886
* [lexical][lexical-playground] Bug Fix: Allow setEditorState to work correctly inside of an update by @etrepum in https://github.com/facebook/lexical/pull/6876
* [lexical-website] Feature: Document the withKlass option for node replacement by @Shopiley in https://github.com/facebook/lexical/pull/6890

## New Contributors
* @sevki made their first contribution in https://github.com/facebook/lexical/pull/6788
* @ivaaaaann made their first contribution in https://github.com/facebook/lexical/pull/6837
* @hadiham made their first contribution in https://github.com/facebook/lexical/pull/6841
* @dani-lp made their first contribution in https://github.com/facebook/lexical/pull/6268
* @Sachin-Mahato made their first contribution in https://github.com/facebook/lexical/pull/6855
* @hamza221 made their first contribution in https://github.com/facebook/lexical/pull/6658
* @lytion made their first contribution in https://github.com/facebook/lexical/pull/6867

**Full Changelog**: https://github.com/facebook/lexical/compare/v0.20.0...v0.20.2