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.
Move isHTMLElement into core (#4977) Gerard Rovira
Full Changelog: https://github.com/facebook/lexical/compare/v0.11.3...v.0.12.2
Fix: font colors do not apply to text within table cells (#4934) Tahir Shakir
@lexical/utils (#4923) RajatFull Changelog: https://github.com/facebook/lexical/compare/v0.11.3...v0.12.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Extract "select all" behavior to new SELECT_ALL_COMMAND (#4818) Chris Montrois
#4818 moves "select all" behavior to the SELECT_ALL command, meaning anyone using setRootElement directly (i.e., not using PlainTextPlugin or RichTextPlugin or their underlying functions) would need to wire up command listeners for SELECT_ALL_COMMAND in order to preserve the default "select all" behavior after this version.
SELECT_ALL_COMMAND (#4818) Chris MontroisFix table imports (#4795) Maksim Horbachevsky
Full Changelog: https://github.com/facebook/lexical/compare/v0.11.2...v0.11.3
Better Error Message for exportJSON type by @howlowck in https://github.com/facebook/lexical/pull/4556
AutocompleteNode.clone() by @msdrigg in https://github.com/facebook/lexical/pull/4592Full Changelog: https://github.com/facebook/lexical/compare/v0.11.1...v0.11.2
AutocompleteNode.clone() (#4592) Scott DriggersFix update-changelog not finishing by @zurfyx in https://github.com/facebook/lexical/pull/4537
Full Changelog: https://github.com/facebook/lexical/compare/v0.11.0...v0.11.1
Arguably no major new features but this version comes with substantial bugfixes! Most notably:
Arguably no major new features but this version comes with substantial bugfixes! Most notably:
createRectsFromDOMRange for Mark-like plugins(you can read more on these on the changelog below)
While we strongly advocate for a11y and features that work across devices, there is significant demand for desktop users to have access to tooling via the right click. UX-wise, they're very familiar with it as it's common within other editors such as the well-known Google Docs, Pages and Microsoft Word and it's also the fastest.
LexicalContextMenu is a WIP and not ready for production but the prototype is already live in the Playground under a feature flag (see the gear on the bottom left to enable it /?shouldUseLexicalContextMenu=true)
MarkNode::clone node arg type to this by @potomak in https://github.com/facebook/lexical/pull/4363Full Changelog: https://github.com/facebook/lexical/compare/v0.10.0...v0.11.0
However, it means that links using less common protocols will now be sanitized (converted to about:blank), which will be a breaking change for any exi…
@lexical/link will now sanitize anchor tag hrefs before rendering them to the DOM. This provides a measure of protection against XSS attacks that rely on inlining javascript in that attribute. However, it means that links using less common protocols will now be sanitized (converted to about:blank), which will be a breaking change for any existing links.
Like most other node-based logic in Lexical, the sanitization logic can be overriden by overriding LinkNode using the Node Overrides API and replacing it with a node that implements the sanitizeUrl method differently.
Fixes CVE-2023-30792
Update codes.json (#4320) Gerard Rovira
aria-label typo (#4229) Hao LuoExplicit E2E_BROWSER on E2E runs (#4179) Gerard Rovira
HorizontalRuleNode (#4097) Chris MontroisaddUpdateListener method in transforms doc (#4094) Kevin Ansfielddeprecate $wrapNodes (#4059) Acy Watson
Clone objects from the CSS cache before mutating them (#3945) Brian Birtles
This release includes some breaking changes, including:
This release includes some breaking changes, including:
- Remove of indentList and outdentList from @lexical/list.
- Refactor of the LexicalContentEditable types from @lexical/react to make them more accurate with HTMLDivElement attributes.
This release adds functionality to apply node transforms to node replacements, it allows users to specify tab indentation sizes, and improved support for tracking the origin of YJS updates for collaborative editing.
Fix bad import into core (https://github.com/facebook/lexical/pull/3861) Dominic Gannaway Add import/export DOM methods to YouTubeNode and improve Equ
Fix bad import into core (https://github.com/facebook/lexical/pull/3861) Dominic Gannaway Add import/export DOM methods to YouTubeNode and improve EquationNode (https://github.com/facebook/lexical/pull/3835) Pervez Ali Fix backspace regression (https://github.com/facebook/lexical/pull/3862) Dominic Gannaway Fix restoreEditorState (https://github.com/facebook/lexical/pull/3856) Dominic Gannaway Add more configuration for heading in INSERT_TABLE_COMMAND (https://github.com/facebook/lexical/pull/3843) Sebastien Ahkrin perf(playground): load prettier and its parsers on demand in code block (https://github.com/facebook/lexical/pull/3637) Shanmughapriyan
Update transforms.md (#3845) Ben
Remove deprecated modules from core code base (#3729) John Flockton
createParentElementNode method on LexicalNode to fix copy/paste issues with clipboard (#3800) John FlocktonFix typo in LexicalAutoLinkPlugin code example (#3685) Lorenzo
selectionChange fix (#3623) Dominic Gannaway
Add missing usages of $applyNodeReplacement (#3592) John Flockton
$applyNodeReplacement (#3592) John FlocktonFix bold italic exportDOM (#3584) Dominic Gannaway
Use the actual node count rather than the dirty node count (#3569) Dominic Gannaway
Contains several small bug fixes from the Lexical 0.7.0 release.
Contains several small bug fixes from the Lexical 0.7.0 release.
Lexical 0.7 includes some breaking changes, including:
Lexical 0.7 includes some breaking changes, including:
$cloneContents from @lexical/selectionPlainTextPlugin and RichTextPlugin with regards to how placeholders are handledRichTextPlugin no longer indents by default, use the LexicalTabIndentationPlugin for this behavior.unstable_convertLegacyJSONEditorState has been removed. This was always meant to be a temporary work-around to allow developers to convert their formats to the new JSON format rather than using the actual editor state internals directly.Lexical 0.7 includes performance and usability improvements. Notably, Lexical has a new internal architecture that allows for much better performance with large documents of content. Lexical also now provides a way to handle selection between blocks of content by providing an emulated cursor (make sure you add a blockCursor theme to your editor config to use it).
Fix mutation listener for when DOM moves occur (#3493) Dominic Gannaway
Fix issue with readonly image resizing (#3448) John Flockton
type="button" to <button /> components (#3447) Scott AgirsApply event propagation between all event types (#3401) Dominic Gannaway
Validate dragon origin (#3385) Dominic Gannaway
Nothing published for this version
These will likely be more unstable, informal and might contain undocumented breaking changes. That said, that's what we do internally at Meta where we…
Happy halloween!
108 commits! That's 66% more than 0.5.0. This release comes with many many fixes. But let's go over the highlights first:
We just introduced a semi-automated release process for those of you who want to be at the cutting edge (looking at you Discord folks). New versions with the latest on the main branch will be pushed Monday through Friday.
You can find on NPM tagged with next (npm i lexical@next)
These will likely be more unstable, informal and might contain undocumented breaking changes. That said, that's what we do internally at Meta where we sync the Lexical GitHub repository onto Mercurial multiple times per week.
The possibility to do spoiler containers has been a highly requested feature. We prototyped an efficient React-agnostic playground plugin that you can find on the playground (CollapsiblePlugin). It may eventually make it to @lexical/react
https://user-images.githubusercontent.com/193447/199079683-a065cc72-f526-42d6-a8c2-2f4fe6640ba5.mov
Having seen many and very similar drag & drop implementations at Meta, we have come to the conclusion that dragging, dropping and pasting media is a fundamental piece of rich text. Hence, it is now built-in into the RichTextPlugin and you no longer have to implement your own event handling.
https://user-images.githubusercontent.com/193447/199079730-c9e6182c-64bd-4329-b536-9524c2fb3e09.mov
See the DragDropPaste playground plugin for an example on how to validate and insert your media nodes into the editor.
Safety first! React Decorators will now be independently wrapped with an ErrorBoundary and Suspense.
We found that it is very easy to miss either of them when implementing custom DecoratorNodes, and when either is missed and the component either crashes or suspends this causes the editor to be unusable.
https://user-images.githubusercontent.com/193447/199079773-f132645e-1822-497d-9768-b1694e688c7e.mov
Breaking change: you now have to provide an ErrorBoundary to RichTextPlugin (you can use ours).
import {LexicalErrorBoundary} from 'lexical/@react/LexicalErrorBoundary';
<RichTextEditor ... ErrorBoundary={LexicalErrorBoundary} />
From internal and open-source feedback, TreeView has become an indispensable tool to work with Lexical. It gives you the ability to glance over the current state and understand how plugins work with each other.
We added the namespace and the editable state, which we feel is important to complement the read-only mode version of Lexical.
Note that, while you can convert to HTML for the read-only view, Lexical size and the possibility to have high-fidelity rendering at no cost makes it a perfect candidate for to place in a read-only mode.
In any case, @im-adithya continues the work on the cross-browser extension, what will be the preferred and most complete approach for day-to-day development.
discrete property to editor.update to perform synchronous non-batched updates. Synchronous updates are often terrible performance-wise but there are concrete occasions where they can come useful. TL;DR be careful!getSelection by @yongdamsh in https://github.com/facebook/lexical/pull/3162time travel after reaching maximum range by @shanpriyan in https://github.com/facebook/lexical/pull/3197eslint-plugin with rule no-optional-chaining locally by @shanpriyan in https://github.com/facebook/lexical/pull/3233isHighlighting flag into object literal by @thegreatercurve in https://github.com/facebook/lexical/pull/3256Full Changelog: https://github.com/facebook/lexical/compare/v0.5.0...v0.6.0
Thank you open-source community for helping us shape yet another version! Happy halloween and back to coding 👨💻
eslint-plugin with rule no-optional-chaining locally (#3233) Shanmughapriyan Stime travel after reaching maximum range (#3197) Shanmughapriyan SgetSelection (#3162) Lee SanghyeonNothing published for this version
Nothing published for this version
Nothing published for this version
We deprecated the Grid API. The future of the Grid API is uncertain but if there's something we know is that it isn't a good fit in the lexical packag…
v0.5.0 (20 days after v0.4.0) comes with a meaty set of features, API refinements and bugfixes.
One of the most beloved features of Notion is the ability to seamlessly move blocks within the same document. @LuciNyan has ported this behavior to Lexical under the DraggableBlockPlugin name. You can check it out in our playground!
https://user-images.githubusercontent.com/22126563/190201193-3784dc18-7214-4b48-afba-ade0b5aa288d.mov
We started our tables (@lexical/react/LexicalTablePlugin) development at the start of the year, one of the most ambitious and complex plugins we have built for rich text. We have blocked a good amount of time during this past month to work with multiple internal teams to identify and squash most of these (10+) high-pri bugs that make the experience unideal and we believe they are now in a good shape to meet their first internal users.
We have introduced a new advanced concept for Lexical ElementNodes: [Shadow Root](https://lexical.dev/docs/api/classes/lexical.ElementNode#isshadowroot). A Shadow Root is a Node that behaves like a root (we stole the name from Shadow DOM). This method enables you to have complex deep rich text hierarchies where children node shouldn't see beyond the parent. For example, the cell node content.
We introduced a seamless way to handle node insertion. We bundled {rangeSelection/nodeSelection/gridSelection}.insertNode into just one method: $insertNodes. We also added insertNodes support for NodeSelection and GridSelection that was previously not supported.
https://user-images.githubusercontent.com/193447/178761488-d39987f7-2a90-4604-b4fc-dfbf57178f35.mov
initialEditorState. We found that this is unintuitive to handle nested editors and harder to control SSR-enabled pages. Instead, MLCComposer will take and apply the initialEditorState on editor creationlexical package, it serves a very specific use case and it's redundant for plain text.We listened to your (mostly Discord) feedback, you want to have the latest, more frequently, especially when some of you are heavily involved into the development and growth of the Lexical framework.
The reality is, we didn't choose to postpone releases for 2 weeks. It has mostly been a lack of automation and making sure we bundle breaking API changes to avoid developer churn.
We know that there's no one-size-fits-all when it comes to developers, and that's why we want to offer different ways to play with the library, what we have now, a slow-ish but less time-consuming (for you) release cycle but also offer nightly releases that would happen automatically once per day and would include the very latest of the development.
The work is still under development but we plan to start this soon, stay tuned!
Full Changelog: https://github.com/facebook/lexical/compare/v0.4.1...v0.5.0
Thank you open-source community for your help shaping this brand new release, either via direct PR contributions, feedback or bug reports!
Fix breaking bug for isEditable mode in editor initialization (#2945) Tim Laubert
isEditable mode in editor initialization (#2945) Tim Lauberteditor.isReadyOnly -> editor.isEditable() editor.setReadyOnly -> editor.setEditable() editor.registerReadOnlyListener -> editor.registerEditableListen
editor.isReadyOnly -> editor.isEditable() editor.setReadyOnly -> editor.setEditable() editor.registerReadOnlyListener -> editor.registerEditableListener() editor config { readOnly: true } -> { editable: boolean }
https://github.com/facebook/lexical/pull/2912
The "dependencies" property is now required for custom markdown Element and TextMatch Transformers. It takes an array of LexicalNode subclasses and asserts that they're available in the editor when transforms are registered.
https://github.com/facebook/lexical/pull/2910
Lexical will now track and update selection in response to DOM selectionchange events when editor.isEditable is false. This is necessary for enabling some behavior such as commenting via marks, but may cause other indirect changes such as update listeners firing when they didn't previously.
addTransform with registerNodeTransform in transforms doc (#2882) Kevin AnsfieldFull Changelog: https://github.com/facebook/lexical/compare/v0.3.9...v0.4.0
fix more code imports (#2828) Acy Watson
Fix Code imports (#2826) Gerard Rovira
Added playground Figma embed and AutoEmbed plugin
Most notably:
Commits:
timeoutId type (#2735) Shanmughapriyan S@lexical/code into more atomic modules (#2673) John FlocktonstartTransition if it's present (#2676) Jack HanfordIntroduces TypeaheadPlugin and associated primitives, which consolidate the implementation of all such functionality (mentions and component picker) a
Lots of bug fixes.
Introduces TypeaheadPlugin and associated primitives, which consolidate the implementation of all such functionality (mentions and component picker) and create a base to build similar typeahead functionality from.
Introduces TableOfContents plugin for easier navigation of long-form documents. Available in the playground in the settings menu (bottom-left corner).
Introduces a "clipboard viewer" functionality in the local dev environment. When active, it shows the clipboard content the last time the paste event was fired with the editor focused.
Lots of bug fixes and polish. Notably, the full text of minifed Lexical error codes can now be accessed via the Lexical website.
Lots of bug fixes and polish. Notably, the full text of minifed Lexical error codes can now be accessed via the Lexical website.
lexical.dev/error/<code> (#2574) Gerard Rovirafix(lexical): Text with underline format is stripped out on paste (#2555) 子瞻 Luci
lexical & @lexical/ packages:
lexical-history (#2501) John FlocktonPlayground:
Docs:
Infra:
Fix bad warnOnlyOnce minification
Customizable DecoratorBlockNode via theme
Spread type (#2434)Add stringified LexicalNodes to clipboard for lossless Lexical <-> Lexical copy and paste.
Playground
added typing for ListItemNode.setChecked, export ListNodeTagType
Enable copy+paste on NodeSelection
> Note: this release contains a number of breaking changes.
Note: this release contains a number of breaking changes.
importDOM/exportDOM/importJSON/exportJSON may trigger a warning in DEV.Fix a breaking change to the NPM release
Migrate more packages to TypeScript
Fix Firefox composition bug with emojis
Nothing published for this version
Fix various collab bugs with lists
Add subscript/superscript elements to TextNode
Fix bug in lists causing extra list items to be appended in some cases.
Command priorities are now constants exposed by lexical
Fix selection issue with insertNodes
Add markdown indented list support
Add line numbers in Code Highlight plugin.
Fix build issue with @lexical/code
Fix import issue in @lexical/list
One column per quarter.