npm @lexical/react 0.41.0
v0.41.0

7 hours ago

v0.41.0 is a monthly release with a huge number of fixes and features from a lot of new contributors. The most notable fixes are related to IME, non-ascii keyboard layouts, and markdown.

Breaking Changes

--lexical-indent-base-value CSS moved to root element #8132

The --lexical-indent-base-value CSS custom property is now only read from the root element of the editor, so any CSS or code to set this value must target that rather than an indented element in the document. This allows the indent to be computed while the document is being rendered without layout thrashing.

Highlights

Core

  • ⚠️ #8132 Breaking Change: Fix --lexical-indent-base-value CSS variable override
  • #8111 Prevent layout thrashing when setting element indent for no indent case
  • 🆕 #8115 Support legacy 'align' attribute in ParagraphNode importDOM
  • #8121 IME: Do not move anchor when inserting composition start char
  • #8142 IME: Fix history not recording composing character
  • #8148 IME: Do not apply format and style when moving to a different node in composition
  • #8154 IME: Fix selected text not properly deleted after IME input on Safari (macOS)
  • #8162 IME: Maintain format when multiple formatted text nodes are replaced with composition text
  • #8159 Support DOM selection in elements with slots
    Code
  • 🆕 #7918 Allow moving caret outside of code block
  • 🆕 #8155 Trigger keyboard shortcuts by physical key code with non-ascii keyboard layouts

Extension

  • 🆕 #8114 Implement DecoratorTextExtension applying format to DecoratorTextNode

Rich Text

  • 🆕 #8122 Support configuration of indentable nodes
  • #8152 Inherit format and style when inserting tab

Link

  • #8123 Prevent AutoLink from linking URLs inside code blocks without highlighting
  • #8127 Prevent AutoLinkNode from creating extra paragraphs
  • #8137 Add AutoLinkNode to AutoLinkExtension node dependencies
  • #8138 $toggleLink should remove the whole link when selection is collapsed
  • #8164 Prevent creation of nested LinkNode
  • #8158 Transform to move blocks outside of LinkNode
    List
  • 🆕 #8092 Preserve ordered list numbering when split by blocks or paragraphs
  • #8118 Remove empty parent node in nested list
  • 🆕 #8105 Add focus event option for the checklist extension

Table

  • 🆕 #8097 Implement "fit nested tables" for nested table pasting
  • 🆕 #8094 Support 'scope' attribute in HTML import for th tags
  • #8131 Preserve Background Color when pasting table rows inside table

Markdown

  • #8116 Fix nested fenced code blocks parsing and export
  • 🆕 #8140 Support Enter key after ``` to create code block
  • #8161 Prevent markdown shortcut link transformer from being too greedy

Playground

  • 🆕 #8063 Rearrange table columns
  • #8134 Increase toolbar z-index to prevent content overlap
  • #8149 Code block formatting in unintended adjacent lines

What's Changed

  • v0.40.0 by @etrepum in #8104
  • [lexical] Bug Fix: Prevent layout thrashing when setting element indent for no indent case by @InanBerkin in #8111
  • Update examples for v0.40.0 and pnpm by @etrepum in #8110
  • [lexical-table][lexical-playground] Feature: Implement "fit nested tables" for nested table pasting by @randal-atticus in #8097
  • [lexical] Chore: Stabilize playground collab WebKit E2E test waits by @screenfluent in #8113
  • Fix(table): Support 'scope' attribute in HTML import. by @Sa-Te in #8094
  • [lexical] Feature: Support legacy 'align' attribute in ParagraphNode importDOM by @Sa-Te in #8115
  • [lexical-list] Feature: Preserve ordered list numbering when split by blocks or paragraphs by @Sa-Te in #8092
  • [lexical-markdown] Bug Fix: Fix nested fenced code blocks parsing and export by @abdulalim110 in #8116
  • [lexical-playground] tests for ComponentPickerMenuPlugin by @umaranis in #8128
  • [lexical] Bug Fix: Remove empty parent node in nested list by @Senasiko in #8118
  • [lexical-extension][lexical-rich-text][lexical-react] Feature: Support configuration of indentable nodes by @levensta in #8122
  • [lexical-link] Bug Fix: Prevent AutoLink from linking URLs inside code blocks by @achaljhawar in #8123
  • [lexical-playground]: Rearrange table columns by @ivailop7 in #8063
  • [lexical-playground][lexical-link] Bug Fix: Prevent AutoLinkNode from creating extra paragraphs by @polyrainbow in #8127
  • [lexical-react] Annotate @deprecated to menuRenderFn with NodeContext… by @thatmichael85 in #8001
  • [lexical] Bug Fix: Do not move anchor when inserting composition start char by @kimseongyu in #8121
  • [lexical-table] Fix: Preserve Background Color when pasting table rows inside table. by @Sa-Te in #8131
  • [lexical-code] Bug Fix: Allow moving caret outside code block by @lytion in #7918
  • [Breaking Change][lexical] Bug Fix: Fix --lexical-indent-base-value CSS variable override by @achaljhawar in #8132
  • [lexical-playground] Fix: Increase toolbar z-index to prevent content overlap by @Sa-Te in #8134
  • [lexical-link] Bug Fix: Add AutoLinkNode to AutoLinkExtension node dependencies by @etrepum in #8137
  • [lexical-playground]: Clean up old Table Hover Actions by @ivailop7 in #8139
  • [lexical-website] Chore: Update supported browsers list to Safari 15+, Chrome 86+, Firefox 115+ by @etrepum in #8141
  • [lexical-link] Bug Fix: $toggleLink removes link when selection is collapsed by @Senasiko in #8138
  • [lexical-markdown] Feature: Support Enter key after ``` to create code block by @achaljhawar in #8140
  • [lexical-extension] Feature: Implement DecoratorTextExtension applying format to DecoratorTextNode by @levensta in #8114
  • docs: fix formatting and update browser support table by @IkyssOffc in #8144
  • [lexical-website] Chore: Add a website build step to Github Actions in CI by @etrepum in #8146
  • [lexical-history] Bug Fix: History not record composing character by @Senasiko in #8142
  • [lexical] Bug Fix: Do not apply format and style when moving to different node in composition by @kimseongyu in #8148
  • [lexical-playground] Bug Fix: Code block formatting in unintended adjacent lines by @achaljhawar in #8149
  • [lexical-rich-text] Bug Fix: Inherit format and style when inserting tab by @kimseongyu in #8152
  • [lexical-core] Bug fix: support dom selection for elements with slots by @fantactuka in #8159
  • [lexical] Bug Fix: Fix selected text not properly deleted after IME input on Safari (macOS) by @sKawashima in #8154
  • feat: add focus event option for the checklist extension by @rayterion in #8105
  • [lexical-markdown] Fix: Prevent markdown shortcut link transformer from being too greedy by @etrepum in #8161
  • [lexical] Bug Fix: Maintain format when replace multiple formatted text nodes with composition text by @kimseongyu in #8162
  • [tests] Chore: Update yaml-language-server in lexical-esm-astro-react integration fixture by @PikkaPikkachu in #8163
  • [lexical-markdown] Bug Fix: Prevent nesting links creation by @levensta in #8164
  • [lexical] Bug Fix: Move new paragraph outside inline element in insertParagraph by @achaljhawar in #8158
  • [lexical] Bug Fix: REDO_COMMAND not triggered with non-English keyboard layouts (Ctrl+Y / Ctrl+Shift+Z) by @kenclaron in #8155

New Contributors

Full Changelog: v0.40.0...v0.41.0

Don't miss a new react release

NewReleases is sending notifications on new releases.