NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #4968 most downloaded on npm
This package contains misc utilities for Lexical.
Latest stable
0.53.0
Last release 12 days ago
10 Nov 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
724 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
v0.38.2 is a patch release to fix a regression in yjs cursor position awareness (#7960). It also includes another fix for a Markdown issue.
v0.38.2 is a patch release to fix a regression in yjs cursor position awareness (#7960). It also includes another fix for a Markdown issue.
React:
Markdown:
Full Changelog: https://github.com/facebook/lexical/compare/v0.38.1...v0.38.2
Nothing published for this version
Nothing published for this version
Nothing published for this version
v0.38.1 is a monthly release with a lot of fixes and a few potentially breaking changes (this is a re-publish of v0.38.0, which had problems during in…
v0.38.1 is a monthly release with a lot of fixes and a few potentially breaking changes (this is a re-publish of v0.38.0, which had problems during initial npm publish).
Before $config there was a limited amount of "automatic" re-use of the static transform by subclasses, because class inheritance also inherits static methods, so you get the implementation of whatever static transform method was in the superclass if it wasn't overridden.
Now the application of these static transforms (whether by method or $config) is implicit. There is no need to call super if adding an additional transform. The implementation walks up the inheritance tree by $config extends or Object.getPrototypeOf and will register all transforms it finds.
If you are using CodeHighlighterShikiExtension the configuration has changed.
Before:
configExtension(CodeHighlighterShikiExtension, {tokenizer: {...ShikiTokenizer, defaultTheme: …})
After:
configExtension(CodeHighlighterShikiExtension, {defaultTheme: …})
This is unlikely to break most applications but the priority of these command listeners has been lowered to allow them to be overridden.
Core:
Extension:
List:
Table:
Clipboard:
Link:
React:
Collab v2:
Code:
Markdown:
Playground:
Examples:
Documentation:
Full Changelog: https://github.com/facebook/lexical/compare/v0.37.0...v0.38.1
@lexical/code-shiki: CodeHighlighterShikiExtension config flattened
@lexical/code-shiki: CodeHighlighterShikiExtension config flattened (#7936)
Tokenizer options are top-level config keys.
Detect: configExtension(CodeHighlighterShikiExtension, {tokenizer: ...}).
Migration:
// Before
configExtension(CodeHighlighterShikiExtension, {
tokenizer: {...ShikiTokenizer, defaultTheme: 'github-dark'},
});
// After
configExtension(CodeHighlighterShikiExtension, {defaultTheme: 'github-dark'});
lexical: Static transforms from superclasses always apply (#7926)
Static transform() methods and $config $transform from
every superclass are registered automatically.
Detect: subclasses whose transform calls the superclass transform manually.
Migration: remove manual calls to the superclass transform to avoid running it twice.
Verify: transforms of subclassed nodes such as ListNode / ListItemNode.
@lexical/table: Table selection handler priorities lowered (#7933)
Table selection command listeners use
COMMAND_PRIORITY_HIGH instead of COMMAND_PRIORITY_CRITICAL.
Detect: your own listeners at COMMAND_PRIORITY_HIGH for commands that
@lexical/table also handles while a table is selected.
Migration: None, unless ordering relative to table handlers matters.
Verify: keyboard handling inside tables.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
v0.37.0 is an ad-hoc release, primarily to update the happy-dom dependency to address a CVE (#7909 - lexical's usage of this package was not susceptib
v0.37.0 is an ad-hoc release, primarily to update the happy-dom dependency to address a CVE (#7909 - lexical's usage of this package was not susceptible) but also includes several bug fixes. This was marked as a minor release because it includes an experimental collab v2 implementation which is not yet ready for use (see #7616 #7903)
Core:
$cloneWithProperties so that it doesn't throw an exception when used in read-only modeExamples:
React:
Collab:
List
Rich Text:
Clipboard/Playground:
<figure> from ImageNode captions)Headless
Full Changelog: https://github.com/facebook/lexical/compare/v0.36.2...v0.37.0
@lexical/yjs: getAnchorAndFocusCollabNodesForUserState deprecated (#7616)
Replacement: $getAnchorAndFocusForUserState.
Removal: not scheduled.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
v0.36.2 is a bug fix release, primarily to fix a problem with the @lexical/headless package.json that prevented the new @lexical/headless/dom from bei
v0.36.2 is a bug fix release, primarily to fix a problem with the @lexical/headless package.json that prevented the new @lexical/headless/dom from being used as designed. It also includes several improvements and bug fixes such as the new SKIP_SELECTION_FOCUS_TAG.
Core:
SKIP_SELECTION_FOCUS_TAG to allow the update to set the DOM selection but not automatically ensure that the root element is focusedClipboard:
Markdown:
importTextMatchTransformer
Table:React:
HTML:
$generateNodesFromDOM now accepts any ParentNode (not just Document) as inputHeadless:
@lexical/headless/dom should be usable nowDocs:
importTextMatchTransformer by @jkjk822 in https://github.com/facebook/lexical/pull/7890Full Changelog: https://github.com/facebook/lexical/compare/v0.36.1...v0.36.2
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
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 o…
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.
DecoratorNodeDecoratorNode to implement decorate()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)useCollaborationContext now requires that a context provider is usedUsers of the CollaborationPlugin or useCollaborationContext must wrap the top-level LexicalComposer with a LexicalCollaboration component. For example:
<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.
useCollaborationContext no longer has clientIDclientID 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.
Extension:
Core:
RangeSelection#extractsetManagedLineBreakTabNode.setTextContent uses devInvariant instead of invariant for a warning in prodClipboard:
List:
Markdown:
MarkdownShortcuts.ts dependency on index.tsReact:
Headless:
@lexical/headless/dom module featuring withDOM function to make SSR easierPlayground:
InlineImageNode and InlineImageNodePluginInternal:
RangeSelection#extract by @jkjk822 in https://github.com/facebook/lexical/pull/7836isTriggerVisibleInNearestScrollContainer to prevent popover from wrongfully closing by @dwrth in https://github.com/facebook/lexical/pull/7844setManagedLineBreak by @elpnt in https://github.com/facebook/lexical/pull/7854Full Changelog: https://github.com/facebook/lexical/compare/v0.35.0...v0.36.1
lexical-react Breaking change enforce use of collab context provider (#7818) James Fitzsimmons
lexical: DecoratorNode.decorate() is optional and may return null (#7706)
decorate() is no longer required and its type is
decorate(): null | T.
Detect: code that calls node.decorate() and uses the result without a
null check.
Migration: handle null.
@lexical/react: LexicalCollaboration provider required (#7818)
CollaborationPlugin and useCollaborationContext require a
LexicalCollaboration provider around the top-level LexicalComposer.
Detect: imports of CollaborationPlugin or useCollaborationContext.
Migration:
import {LexicalCollaboration} from '@lexical/react/LexicalCollaborationContext';
<LexicalCollaboration>
<LexicalComposer initialConfig={initialConfig}>
<CollaborationPlugin id="lexical-editor" /* ... */ />
</LexicalComposer>
</LexicalCollaboration>;
Use one provider for the top-level editor only; nested editors share it.
@lexical/react, @lexical/yjs: clientID removed from the collaboration context (#7816)
useCollaborationContext() no longer returns clientID.
Detect: clientID read from useCollaborationContext().
Migration: look up the document in the context's yjsDocMap and read
its clientID, or use another identifier.
@lexical/react: HorizontalRuleNode and $createHorizontalRuleNode from @lexical/react/LexicalHorizontalRuleNode deprecated (#7706)
Replacement: HorizontalRuleExtension from @lexical/extension.
Removal: not scheduled.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
All of the breaking changes in this release are related to the improved RTL bidirectional text support in #7727
v0.35.0 is a monthly release with much improved RTL bidirectional text support (#7727) and several bug fixes
All of the breaking changes in this release are related to the improved RTL bidirectional text support in #7727
ltr and rtl theme CSS classes removedltr and rtl theme CSS classes are no longer added to DOM elements. If you have custom CSS to set text-align (or any other properties) for bidirectional text, this can be removed. You can target elements that have customized their dir by targeting the attr in CSS, for example:
[dir=rtl] { text-align: right; }
$isParentElementRTL requires an active editor$isParentElementRTL now relies on accessing the DOM to determine element direction, meaning there must be an active editor when calling the function. If you have code that calls $isParentElementRTL inside editorState.read(), you will need to pass in an editor argument. For example:
const isRTL = editorState.read(
() => {
const selection = $getSelection();
return $isRangeSelection(selection) && $isParentElementRTL(selection);
},
{editor}
);
__dir property is synced to/from Yjs (again)Prior to #7330, the text direction of nodes (as determined by the reconciler) was synced to Yjs, even though this value was ignored on other clients. This property is now used for any manually-set direction attribute on ElementNode.
If you have documents that were created prior to v0.30.0, the previously-reconciled direction will now be read and applied to nodes in the editor. This may lead to unexpected behaviour if, for example, your document contains a paragraph that contained RTL text but content changed to LTR in >= v0.30.0.
Core:
Markdown:
React:
Internal:
Full Changelog: https://github.com/facebook/lexical/compare/v0.34.0...v0.35.0
@lexical/selection: $isParentElementRTL needs an active editor (#7727)
$isParentElementRTL reads the DOM, so it requires an active
editor.
Detect: $isParentElementRTL( inside editorState.read(...) without an
editor option.
Migration:
// Before
editorState.read(() => $isParentElementRTL(selection));
// After
editorState.read(() => $isParentElementRTL(selection), {editor});
lexical: ltr / rtl theme classes no longer applied (#7727)
The ltr and rtl theme classes are no longer added to DOM
elements; the dir attribute is used instead.
Detect: ltr: / rtl: keys in your EditorThemeClasses, and the CSS
they reference.
Migration: target the attribute instead, for example
[dir='rtl'] { text-align: right; }.
Verify: RTL content visually.
@lexical/yjs: __dir synced through Yjs again (#7727)
The ElementNode __dir property is synced, and the value
stored by documents created before v0.30.0 is applied again.
Detect: collaborative documents created before v0.30.0.
Verify: text direction in older collaborative documents.
One column per quarter.