v0.22.0
facebook/lexicalv0.22.0Dec 24, 2024by potatowagon
AI Summary
A release adding capitalization format support and various table fixes, including Google Docs import support.
Key Highlights
- Support for capitalization format added.
- New update tag `skip-dom-selection` causes `$onUpdate` to always be called.
- Unified `$selectAll` implementations.
- Google Docs colgroup import support.
Breaking Changes
- Support for capitalization format requires updating switch statements enumerating `TextFormatType`.
- New `skip-dom-selection` tag changes `$onUpdate` behavior.
New Features
- Capitalization format support.
- Colgroup import support for Google Docs.
- forEachSelectedTextNode exposure.
- Warn about 'display: flex' containers.
Full Release Notes
# Breaking Changes - 🆕 Feature: Support capitalization format https://github.com/facebook/lexical/pull/6897 ^ You may need to update callsites that enumerate all cases of TextFormatType eg. switch statements - 🆕 Feature: New update tag: skip-dom-selection, $onUpdate now always called https://github.com/facebook/lexical/pull/6894 # Highlights Highlights since [v0.21.0](https://github.com/facebook/lexical/releases/tag/v0.21.0) Link: - ✅ Fix: Preserve the start/end of the selection for non-text points when creating a LinkNode https://github.com/facebook/lexical/pull/6883 List: - ✅ Fix: Ensure new paragraph node retains selection styling when exiting list https://github.com/facebook/lexical/pull/6917 Text: - 🆕 Feature: Support capitalization format https://github.com/facebook/lexical/pull/6897 Markdown: - ✅ Fix: preserve the order of markdown tags for markdown combinations, and close the tags when the outmost tag is closed by https://github.com/facebook/lexical/pull/5758 Table: - 🆕 Support google docs colgroup import (via deprecated col width attribute) https://github.com/facebook/lexical/pull/6971 - ✅ fix: check is current selection in target table node https://github.com/facebook/lexical/pull/6979 - ✅ Fix: Allow TableSelection to be preserved during contextmenu events https://github.com/facebook/lexical/pull/6964 - ✅ Fix: Insertion of multiple rows https://github.com/facebook/lexical/pull/6963 - ✅ Fix: Delete table row in merge cells https://github.com/facebook/lexical/pull/6922 - ✅ Fix: Enforce table integrity with transforms and move non-React plugin code to @lexical/table https://github.com/facebook/lexical/pull/6914 Selection: - 🆕 feature: expose forEachSelectedTextNode https://github.com/facebook/lexical/pull/6981/files - 🆕 Feature: Unify $selectAll Implementations https://github.com/facebook/lexical/pull/6902 Core editor: - ✅ Fix: Refactor markSelection for getDOMSlot and not using updateDOM https://github.com/facebook/lexical/pull/6961 - ✅ Refactor: exportJSON, nodes dont need to redeclare exportJSON https://github.com/facebook/lexical/pull/6983 - 🆕 Feature: New update tag: skip-dom-selection, $onUpdate now always called https://github.com/facebook/lexical/pull/6894 - 🆕 Feature: Warn about "display: flex" container for the editor https://github.com/facebook/lexical/pull/6901 React: - ✅ Replace React$MixedElement and React$Node with React.MixedElement and React.Node in flow API https://github.com/facebook/lexical/pull/6984 - ✅ Fix: the location of draggable-block-menu cannot be calculated https://github.com/facebook/lexical/pull/6966 ## What's Changed * [Documentation Update] Add release protocol to maintainers-guide.md by @potatowagon in https://github.com/facebook/lexical/pull/6895 * v0.21.0 by @potatowagon in https://github.com/facebook/lexical/pull/6896 * [lexical-link] Bug Fix: Preserve the start/end of the selection for non-text points when creating a LinkNode by @etrepum in https://github.com/facebook/lexical/pull/6883 * [lexical-website][lexical-react] Documentation Update: documentation for LexicalTreeView plugin by @Kingscliq in https://github.com/facebook/lexical/pull/6898 * Warn about "display: flex" container for the editor by @fantactuka in https://github.com/facebook/lexical/pull/6901 * [lexical-website] Fix: /docs/react/ "next" button links to itself by @vantage-ola in https://github.com/facebook/lexical/pull/6911 * [lexical-table][lexical-utils][lexical-react]: Bug Fix: Enforce table integrity with transforms and move non-React plugin code to @lexical/table by @etrepum in https://github.com/facebook/lexical/pull/6914 * [lexical][@lexical/selection] Feature: Unify $selectAll Implementations by @elgh0ul in https://github.com/facebook/lexical/pull/6902 * [lexical-playground]: Fix empty layout item causes 100% CPU usage by @basile-savouret in https://github.com/facebook/lexical/pull/6906 * [lexical-playground] Chore: Update Prettier to v3 by @daichan132 in https://github.com/facebook/lexical/pull/6920 * Doc nits by @zurfyx in https://github.com/facebook/lexical/pull/6927 * Update core-tests workflow triggers by @zurfyx in https://github.com/facebook/lexical/pull/6928 * [*] Bug Fix: add merge_group to the tests workflow by @etrepum in https://github.com/facebook/lexical/pull/6932 * [Breaking Change][lexical-list] Fix: Preserve original format after indenting list item by @citruscai in https://github.com/facebook/lexical/pull/6912 * [lexical-playground] Fix: tabs do not show strikethrough/underline by @vantage-ola in https://github.com/facebook/lexical/pull/6811 * [lexical-playground] Refactor: editor styles should in PlaygroundEditorTheme.css by @umaranis in https://github.com/facebook/lexical/pull/6934 * [lexical-react]Bug Fix: the location of draggable-block-menu cannot be calculated #6818 by @lin-mt in https://github.com/facebook/lexical/pull/6915 * [lexical-list] Bug Fix: Ensure new paragraph node retains selection styling when exiting list by @aleksandr-lapushkin in https://github.com/facebook/lexical/pull/6917 * [lexical-table] Fix: Delete table row in merge cells by @iamvinayvk in https://github.com/facebook/lexical/pull/6922 * [scripts-integration-fixtures] Address GitHub detected a vulnerability in the @sveltejs/kit dependency by @Fetz in https://github.com/facebook/lexical/pull/6943 * [lexical-list] Revert PR 6912 by @potatowagon in https://github.com/facebook/lexical/pull/6944 * [lexical-onboarding] testing sev mitigation by @nyogi in https://github.com/facebook/lexical/pull/6952 * Test comment for pr testing by @bailey-meta in https://github.com/facebook/lexical/pull/6953 * Create a test PR by @Tranquiliz00 in https://github.com/facebook/lexical/pull/6955 * Revert "[lexical-onboarding] testing sev mitigation (#6952)" by @nyogi in https://github.com/facebook/lexical/pull/6956 * Revert "Test comment for pr testing (#6953)" by @bailey-meta in https://github.com/facebook/lexical/pull/6957 * Test234 by @Tranquiliz00 in https://github.com/facebook/lexical/pull/6958 * [Breaking Change][lexical] Feature: New update tag: skip-dom-selection, $onUpdate now always called by @etrepum in https://github.com/facebook/lexical/pull/6894 * [lexical-table][lexical-playground] Fix: Insertion of multiple rows by @iamvinayvk in https://github.com/facebook/lexical/pull/6963 * [lexical-playground] Bug Fix: Allow scrolling if the table cell content overflows by @Parasaran-Python in https://github.com/facebook/lexical/pull/6966 * [lexical][Breaking Change][lexical-rich-text][lexical-playground] Feature: Support capitalization format by @bedre7 in https://github.com/facebook/lexical/pull/6897 * [lexical-website] Add Discord to the community section of the footer by @etrepum in https://github.com/facebook/lexical/pull/6967 * [lexical][lexical-table] Bug Fix: Allow TableSelection to be preserved during contextmenu events by @etrepum in https://github.com/facebook/lexical/pull/6964 * [lexical-utils] Bug Fix: Refactor markSelection for getDOMSlot and not using updateDOM by @etrepum in https://github.com/facebook/lexical/pull/6961 * [lexical-markdown] Bug Fix: preserve the order of markdown tags for markdown combinations, and close the tags when the outmost tag is closed by @yhw5 in https://github.com/facebook/lexical/pull/5758 * [lexical-table] Feature: Support google docs colgroup import (via deprecated col width attribute) by @etrepum in https://github.com/facebook/lexical/pull/6971 * [Documentation][lexical-website]: Documentation for useLexical node selection hook by @Kingscliq in https://github.com/facebook/lexical/pull/6976 * [lexical][lexical-table] Bug fix: TablePlugin: - check is current selection in target table node by @Ulop in https://github.com/facebook/lexical/pull/6979 * feature: expose forEachSelectedTextNode by @GermanJablo in https://github.com/facebook/lexical/pull/6981 * Refactor: exportJSON by @GermanJablo in https://github.com/facebook/lexical/pull/6983 * [lexical] Fix flow error: change this to any by @potatowagon in https://github.com/facebook/lexical/pull/6992 * [lexical-react] Refactor: Replace `React$MixedElement` and `React$Node` with `React.MixedElement` and `React.Node` by @SamChou19815 in https://github.com/facebook/lexical/pull/6984 ## New Contributors * @elgh0ul made their first contribution in https://github.com/facebook/lexical/pull/6902 * @basile-savouret made their first contribution in https://github.com/facebook/lexical/pull/6906 * @daichan132 made their first contribution in https://github.com/facebook/lexical/pull/6920 * @lin-mt made their first contribution in https://github.com/facebook/lexical/pull/6915 * @nyogi made their first contribution in https://github.com/facebook/lexical/pull/6952 * @bailey-meta made their first contribution in https://github.com/facebook/lexical/pull/6953 * @Tranquiliz00 made their first contribution in https://github.com/facebook/lexical/pull/6955 * @Parasaran-Python made their first contribution in https://github.com/facebook/lexical/pull/6966 * @yhw5 made their first contribution in https://github.com/facebook/lexical/pull/5758 * @Ulop made their first contribution in https://github.com/facebook/lexical/pull/6979 * @SamChou19815 made their first contribution in https://github.com/facebook/lexical/pull/6984 **Full Changelog**: https://github.com/facebook/lexical/compare/v0.21.0...v0.22.0