Skip to content

v0.30.0

Latest
Compare
Choose a tag to compare
@etrepum etrepum released this 07 Apr 16:58
· 16 commits to main since this release

Breaking Changes

Listeners are now always called with the editor they were registered to

#7378 changed the internal updateEditorSync implementation to always use the correct active editor when triggering a listener. This only affects how nested editors delegate their events to listeners attached to a parent editor. If you have listeners attached to the parent editor that expect to be called with the context of the nested editor then you'll have to either also attach the listener to the nested editor, or change the behavior to check the editor argument of the command listener to see which editor the command was originally dispatched to.

Import of markdown blocks preserves separation with shouldPreserveNewLines

#7386 changed the behavior of the markdown import's paragraph merging logic to align with GitHub's markdown editor behavior for list and common markdown formatting expectations when shouldPreserveNewlines is true.

Markdown encoding uses HTML entities to represent leading and trailing whitespace

#7400 changed the markdown encoder to replace leading or trailing whitespace of formatted strings with the corresponding HTML entities

Highlights

Core

  • #7378 Ensure updateEditorSync is always synchronous and use it when triggering listeners
  • #7393 Fix right and up arrow key navigation with decorator nodes
  • #7401 Clone the selection and use $setSelection instead of assigning dirty to true directly
  • #7397 Change $getTextNodeOffset invariant to warn in prod (error in __DEV__)
  • #7412 Fix forward line deletion when using control+K
  • 🆕 #7438 Add text-transform styles to exported HTML

Rich Text

  • #7411 Prevent indentation from becoming negative

Collab

  • #7330 Don't sync ElementNode __dir property
  • #7398 Fix scroll position getting changed when someone else makes a change in collab

Markdown

  • #7386 Preserve paragraph separation after block elements
  • #7395 Prevent Markdown shortcuts from applying to code-formatted text
  • #7400 Replace whitespace with code point when the string has leading and trailing whitespaces

List

  • #7380 Empty list item type change
  • #7420 Enforce strict list indentation
  • 🆕 #7429 Export registerCheckList

Link

  • #7366 Add support for image links via NodeSelection

Devtools

  • #7403 Update debug view to show KEY_ESCAPE_COMMAND immediately

React

  • 🆕 #7404 Add option to disable first item auto-selection in menus

Table

  • 🆕 #7408 Improve logic for pasting table into table
  • 🆕 #7415 Rename and deprecate some table utils

Playground

  • 🆕 #7384 Clear block ElementNode formatting along with TextNode
  • 🆕 #7417 Clear formatting should also clear any indent/outdent if applied
  • #7368 Remove shared imports from playground for easier re-use
  • #7388 Use natural dimensions for inherited image size
  • #7405 Fix floating toolbar position for end-aligned text
  • #7431 Fix immediate broken image display on load failure

What's Changed

  • v0.29.0 by @lilshady in #7375
  • [tests] Update next version by @lilshady in #7374
  • [lexical-playground] Chore: Remove shared imports from playground by @etrepum in #7368
  • [lexical-list] Bug Fix: empty list item type change by @fantactuka in #7380
  • [Breaking Change][lexical] Bug Fix: Ensure updateEditorSync is always synchronous and use it when triggering listeners by @etrepum in #7378
  • Update dependencies: vite,@babel/runtime,prismjs,@babel/helpers by @lilshady in #7381
  • update codeowners by @potatowagon in #7389
  • [lexical-playground] Feature: clear blockelement formatting along with textNode by @harshmetkel24 in #7384
  • [lexical-playground] Bug Fix: Use natural dimensions for inherited image size by @kirandash in #7388
  • [Breaking Change][lexical-markdown] Bug Fix: Preserve paragraph separation after block elements by @kirandash in #7386
  • [lexical-link][lexical-playground] Feature: Add support for image links via NodeSelection by @kirandash in #7366
  • [lexical-yjs] Bug Fix: don't sync ElementNode __dir property by @james-atticus in #7330
  • [lexical-rich-text] Bug Fix: Fix right and up arrow key navigation with decorator nodes by @kirandash in #7393
  • [lexical-markdown] Bug Fix: Prevent Markdown shortcuts from applying to code-formatted text by @takuyakanbr in #7395
  • [lexical-yjs] Bug Fix: Fix scroll position getting changed when someone else makes a change in collab by @amanharwara in #7398
  • [RFC][lexical-markdown] Replace whitespace with code point when the string has leading and trailing whitespaces by @lilshady in #7400
  • [Bug Fix] Clone a node and use $setSelection instead of assigning dirty to true directly. by @lilshady in #7401
  • [lexical-devtools-core] Bug Fix: Update debug view to show KEY_ESCAPE_COMMAND immediately by @kirandash in #7403
  • [lexical-react] Feature: Add option to disable first item auto-selection in menus by @kirandash in #7404
  • [lexical] Chore: Change $getTextNodeOffset invariant to warn in prod (error in DEV) by @etrepum in #7397
  • [lexical-playground] Bug Fix: Floating toolbar position for end-aligned text by @kirandash in #7405
  • [lexical] Bug Fix: Fix forward line deletion when using control+K by @takuyakanbr in #7412
  • [lexical-rich-text] Bug Fix: Prevent indentation from becoming negative by @takuyakanbr in #7411
  • [lexical-table] Feature: Improve logic for pasting table into table by @takuyakanbr in #7408
  • [lexical-table] Refactor: Rename and deprecate some table utils by @takuyakanbr in #7415
  • [lexical-playground] Bug: clear formatting should also clear any indent/outdent if applied by @harshmetkel24 in #7417
  • [lexical-list] Feature: Enforce strict list indentation by @dineug in #7420
  • [lexical-playground] Bug Fix: Immediate broken image display on load failure by @kirandash in #7431
  • Chore: Improve spelling consistency across codebase by @kirandash in #7437
  • [lexical] Feature: Add text-transform styles to exported HTML by @kirandash in #7438
  • [lexical-list] Feature: export registerCheckList by @atsjo in #7429

New Contributors

Full Changelog: v0.29.0...v0.30.0