Download Latest Version v0.38.2 source code.tar.gz (5.7 MB)
Email in envelope

Get an email when there's a new version of Lexical

Home / v0.36.1
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-09-25 8.5 kB
v0.36.1 source code.tar.gz 2025-09-25 5.6 MB
v0.36.1 source code.zip 2025-09-25 6.4 MB
Totals: 3 Items   12.0 MB 0

v0.36.1 is a major feature release with a new Lexical Extension API (#7706), some needed breaking changes to @lexical/yjs (#7816, [#7818]) and a bunch of bug fixes. We've also moved to React 19 (#7802) for all examples, tests, etc. although it should all still remain compatible with React 18 for now.

Breaking Changes

[#7706] DecoratorNode

  • Removed type requirement & warning for DecoratorNode to implement decorate()
  • Widens type for decorate(): T to be decorate(): null | T as that's always how it worked in practice - the generic type here is unsafe and wrong anyway (e.g. $isDecoratorNode is a cast to any type T)

[#7818] useCollaborationContext now requires that a context provider is used

Users of the CollaborationPlugin or useCollaborationContext must wrap the top-level LexicalComposer with a LexicalCollaboration component. For example:

:::typescript
<LexicalCollaboration>
  <LexicalComposer initialConfig={initialConfig}>
    <RichTextPlugin ... />
    <CollaborationPlugin id="lexical-editor" ... />
  </LexicalComposer>
<LexicalCollaboration>

The collaboration context is shared for nested editors, so the provider must only be used on the top-level editor.

[#7818] useCollaborationContext no longer has clientID

clientID has been removed from the collaboration context. This ID was unreliable as it could be updated by nested collab editors. Consumers should retrieve the client ID by looking up the correct document in the context's yjsDocMap, or switch to using a different ID.

Highlights

Extension:

Core:

  • ✅ [#7836] Fix cache coherency issue with RangeSelection#extract
  • ✅ [#7854] Account for Apple WebView in setManagedLineBreak
  • 🧹 [#7855] TabNode.setTextContent uses devInvariant instead of invariant for a warning in prod
  • 🧹 [#7821] Improve error message when a node is registered from a foreign lexical module
  • 🧹 [#7814] Consolidate ancestor lookup via findMatchingParent

Clipboard:

  • ✅ [#7835] Update Lexical Clipboard with Empty Selection
  • ✅ [#7822] Copy correct selection when editor in different window/document

List: - ✅ [#7805] Clear li checklist attributes when inserting nested list

Markdown:

  • 🧹 [#7832] Remove MarkdownShortcuts.ts dependency on index.ts

React:

  • ⚠️ [#7816] Breaking change: remove clientID from collab context
  • ⚠️ [#7818] Breaking change: enforce use of collab context provider
  • ✅ [#7844] Add visibility margin to isTriggerVisibleInNearestScrollContainer to prevent popover from wrongfully closing
  • 🧹 [#7802] [#7803] Update from React 18 to React 19

Headless:

  • 🧪 [#7833] @lexical/headless/dom module featuring withDOM function to make SSR easier

Playground:

  • ✅ [#7786] DatetimeNode DOM updates
  • 🗑️ [#7839] Remove mostly redundant InlineImageNode and InlineImageNodePlugin

Internal:

  • 🧹 [#7766] [#7810] Updated docusaurus and added local search index
  • 🧹 [#7834] Relocate internal eslint plugin to packages/lexical-eslint-plugin-internal
  • 🧹 [#7807] Port scripts unit tests to vitest and fix test include match pattern

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.35.0...v0.36.1

Source: README.md, updated 2025-09-25