v0.21.0
facebook/lexicalv0.21.0Dec 2, 2024by potatowagon
AI Summary
This release introduces experimental scrollable tables with a new DOM slot API, deprecates the `$nodesOfType` function, and fixes numerous bugs related to table selection, cursor handling, and accessibility across the editor core and plugins.
Key Highlights
- Experimental scrollable tables with `getDOMSlot` API
- Deprecation of the `$nodesOfType` function
- New `SelectionAlwaysOnDisplay` plugin to retain selection
- Fixes for table navigation (left/right arrow, tab navigation) and selection color issues
- Accessibility fixes for ARIA attributes and Korean IME support
Breaking Changes
- Deprecate $nodesOfType function
New Features
- Scrollable tables with experimental getDOMSlot API
- SelectionAlwaysOnDisplay plugin
Full Release Notes
# Breaking Changes - π Deprecate $nodesOfType function https://github.com/facebook/lexical/pull/6855 - π Feature: Scrollable tables with experimental getDOMSlot API https://github.com/facebook/lexical/pull/6759 - β Fix get table-cell background selection color from a class https://github.com/facebook/lexical/pull/6658 Example change would be https://github.com/facebook/lexical/pull/6892 # 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 * v0.20.2 by @potatowagon in https://github.com/facebook/lexical/pull/6891 * Fix selected table colors by @zurfyx in https://github.com/facebook/lexical/pull/6892 * [lexical-table] Bug Fix: TableNode exportDOM fixes for partial table selection by @etrepum in https://github.com/facebook/lexical/pull/6889 ## 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.21.0