Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
DecoratorNodeDecoratorNodeto implementdecorate()decorate(): Tto bedecorate(): null | Tas that's always how it worked in practice - the generic type here is unsafe and wrong anyway (e.g.$isDecoratorNodeis a cast to any typeT)#7818
useCollaborationContextnow requires that a context provider is usedUsers of the
CollaborationPluginoruseCollaborationContextmust wrap the top-levelLexicalComposerwith aLexicalCollaborationcomponent. For example:The collaboration context is shared for nested editors, so the provider must only be used on the top-level editor.
#7818
useCollaborationContextno longer hasclientIDclientIDhas 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'syjsDocMap, or switch to using a different ID.Highlights
Extension:
Core:
RangeSelection#extract#7836 Fix cache coherency issue withRangeSelection#extractsetManagedLineBreak#7854 Account for Apple WebView insetManagedLineBreakTabNode.setTextContentusesdevInvariantinstead ofinvariantfor a warning in prodClipboard:
List:
Markdown:
MarkdownShortcuts.tsdependency onindex.tsReact:
isTriggerVisibleInNearestScrollContainerto prevent popover from wrongfully closing #7844 Add visibility margin to isTriggerVisibleInNearestScrollContainer to prevent popover from wrongfully closingHeadless:
@lexical/headless/dommodule featuringwithDOMfunction to make SSR easierPlayground:
InlineImageNodeandInlineImageNodePluginInternal:
What's Changed
RangeSelection#extractby @jkjk822 in [lexical] Bug Fix: Fix cache coherency issue withRangeSelection#extract#7836isTriggerVisibleInNearestScrollContainerto prevent popover from wrongfully closing by @dwrth in [lexical-react] Bug Fix: Add visibility margin toisTriggerVisibleInNearestScrollContainerto prevent popover from wrongfully closing #7844setManagedLineBreakby @elpnt in [lexical] Bug Fix: account for Apple WebView insetManagedLineBreak#7854New Contributors
isTriggerVisibleInNearestScrollContainerto prevent popover from wrongfully closing #7844setManagedLineBreak#7854Full Changelog: v0.35.0...v0.36.1