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 10 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
🧹 #8401 #8404 #8405 #8406 #8408 #8409 #8415 #8540 Dependency vulnerability fixes (protobufjs, dompurify, postcss, astro, eslint, immutable, path-to-re…
v0.45.0 is a monthly release with several breaking changes around selection and reconcile semantics, a major new experimental DOMImportExtension API for composable HTML import that replaces importDOM, a generalized DOMSlot and DOM render override surface, new HistoryExtension ergonomics (canUndo/canRedo signals, maxDepth), notable reconciler/selection performance work, and a wide range of bug fixes across IME, mobile keyboards, list/code/table editing, and markdown round-tripping.
lexical — Shadow root inclusion in $getReconciledDirection (#8479)$getReconciledDirection now walks through shadow roots when resolving the reconciled dir attribute on a node, so nested ShadowRoot-style elements (e.g. tables) inherit direction consistently with regular elements. Callers that relied on direction inheritance stopping at shadow roots will need to update.
lexical / @lexical/rich-text — Backspace at block start preserves the current block (#8493)Pressing Backspace at the start of a non-empty block previously merged the current block into the previous block, which discarded the current block's type/format. The new behavior merges the previous block's children into the current block instead, preserving the current block's type (heading, list item, quote, etc.). A new $mergeBlockBackward helper on RangeSelection is exposed for custom command handlers that want the same behavior.
lexical — Selection adjustment in removeFromParent callers (#8501)LexicalNode.replace, insertBefore, insertAfter, and related callers that move a node between parents now correctly adjust the current selection to follow the moved node instead of leaving the selection pointing at the (now empty) original slot. This may change selection state observed by transforms or update listeners that previously relied on the stale offsets.
@lexical/markdown — Apply markdown shortcuts on composition-committed triggers (#8503)Markdown shortcuts (e.g. *, _, ~) typed via IME composition now trigger after the composition is committed, not just on raw beforeinput. This fixes shortcuts being silently dropped during Japanese / Korean / Chinese input but may also fire shortcuts in some flows that previously didn't.
@lexical/extension / @lexical/rich-text / @lexical/plain-text — NormalizeInlineElementsExtension (#8497)registerRichText and registerPlainText now register a transform that removes empty inline elements (e.g. LinkNode, formatted TextNode wrappers with no children) instead of leaving them in the tree. The transform is also exported as NormalizeInlineElementsExtension from @lexical/extension for use with extension-based setups. Editors that intentionally kept empty inline wrappers will need to disable the extension or override the transform. See Included Extensions.
lexical / @lexical/extension / @lexical/rich-text / @lexical/plain-text — NormalizeTripleClickSelectionExtension (#8520)The "triple-click selects the whole paragraph including the trailing newline" normalization has moved out of LexicalEvents and into a new NormalizeTripleClickSelectionExtension registered by both rich-text and plain-text. The core LexicalEditor no longer performs this normalization on its own, so editors that bypass registerRichText / registerPlainText (or the equivalent extensions) need to register the extension explicitly to keep the previous behavior. See Included Extensions.
lexical / @lexical/html / @lexical/selection / @lexical/utils / @lexical/playground — Generalized DOMSlot and DOMRenderExtension override surface (#8519)DOMSlot is now generalized so child slots can be expressed for arbitrary DOM containers (not just the direct child element), and $createDOM, $updateDOM, $exportDOM, $getDOMSlot etc. all flow through the new override surface. The previously-exported AutocompleteNode in the playground has been replaced by a VisibleLineBreakExtension that demonstrates the new override surface, and markSelection in @lexical/utils has been rewritten on top of the generalized slot API. Custom nodes that override getDOMSlot to return a non-element wrapper now have a real way to express that. See the DOMRenderExtension docs.
@lexical/html — DOMImportExtension (experimental) (#8528)A new DOMImportExtension replaces the legacy node-class importDOM static method with a composable middleware-style API. Rules declare a CSS-selector-style matcher, an optional schema for child handling, and a DOMImportFn that builds Lexical nodes from the matching DOM. Many helpers ship alongside it: $distributeInlineWrapper, ImportSession, DOMPreprocessFn for source-specific cleanup (Word, VS Code, etc.), and full TypeScript types for rules, captures, and contexts. A new dev-examples/dom-import showcase wires it up to a Word/VS Code paste flow. The legacy importDOM continues to work; new code can opt in to DOMImportExtension for richer composition and explicit ordering. The companion ClipboardDOMImportExtension (in @lexical/clipboard) routes text/html pastes through the new pipeline. See the DOMImportExtension guide and the "Migrating from importDOM" section.
@lexical/html / @lexical/playground — Conditional DOM render overrides (#8575)domOverride now supports disabledForEditor and disabledForSession predicates so render overrides can be conditionally skipped on a per-editor or per-session basis (e.g. only apply during export, or only when a feature flag is on). Useful when one extension provides multiple overrides whose applicability depends on context that isn't known at registration time. See the DOMRenderExtension docs.
lexical — ElementNode import/export of data-lexical-indent (#8536)ElementNode now uniformly imports and exports the data-lexical-indent attribute so any subclass round-trips its indent level through HTML without having to override exportDOM / importDOM (fixes the long-standing #7729 regression around indented headings/paragraphs).
lexical — Infinite recursion detection in update listeners (#8542)Update listeners and update transforms that re-trigger themselves are now caught by a runtime guard that throws a descriptive error after a configurable number of nested updates, instead of hanging the tab. See Updates and Listeners.
@lexical/history — canUndo / canRedo ReadonlySignals (#8465)HistoryExtension's output now exposes canUndo and canRedo as ReadonlySignal<boolean>s so toolbar buttons can subscribe directly without polling historyState or duplicating the priority/state bookkeeping. See Extension Signals.
@lexical/history — maxDepth option (#8537)HistoryExtension accepts a new maxDepth option that bounds the undo stack. Older entries are evicted FIFO when the depth is exceeded. See the new "Tuning HistoryExtension for memory and long sessions" docs.
@lexical/markdown — $convertSelectionToMarkdownString (#8395)Counterpart to $convertToMarkdownString that serializes only the current selection (or any caller-provided range) to a markdown string, useful for "copy as markdown" toolbar actions and for selection-scoped AI prompts.
lexical / @lexical/list — $setFormatFromDOM (#8460)A new $setFormatFromDOM helper extracts text-align / dir from a DOM element and applies it to an ElementNode. ListItemNode.importDOM now uses it to correctly import alignment for list items pasted from external sources.
@lexical/list — ListNode.createListItemNode (#8427)ListNode exposes a createListItemNode factory that is now used by children-normalization, so ListNode subclasses can supply a custom ListItemNode subclass without monkey-patching the normalizer.
@lexical/rich-text — escapeFormatTriggers on RichTextExtension (#8383)RichTextExtension now accepts an escapeFormatTriggers config (a ReadonlySignal<EscapeFormatTriggerConfig>) that opts text-format escape behavior in/out per trigger (enter, click, arrow, space, tab). With it enabled, typing at the boundary of a formatted text node "escapes" the active format (bold, italic, code, etc.), matching the typing experience in Google Docs / Notion. Disabled by default. See Included Extensions.
@lexical/extension / @lexical/playground — ClickAfterLastBlockExtension (#8549)New ClickAfterLastBlockExtension inserts a fresh paragraph when the user clicks below the last block (and places the caret in it), so single-block editors and short documents don't strand the user with no easy way to start a new line.
@lexical/code-prism / @lexical/code-shiki — null Tokenizer.defaultLanguage (#8553)Tokenizer.defaultLanguage may now be null to indicate that code blocks without an explicit language should round-trip through markdown without injecting a default language tag (e.g. ```javascript). Preserves CommonMark's "no fence info" form on export.
@lexical/code-core / @lexical/code-shiki / @lexical/code-prism — Outdent space-indented code lines (#8445)Shift+Tab in a code block now correctly outdents space-indented lines (not just tab-indented), respecting the tokenizer's configured indent width.
@lexical/react — Optional async onClose for LexicalTypeaheadMenuPlugin (#8489)LexicalTypeaheadMenuPlugin's onClose may now return a Promise, useful for handlers that need to await network or animation work before tearing down the menu.
@lexical/clipboard — GetClipboardDataExtension export (#8431)GetClipboardDataExtension is now exported from @lexical/clipboard for use as a peer dependency from custom clipboard handlers.
@lexical/website — Server-rendered "Copy page" Markdown button (#8570)Every docs page now has a server-rendered "Copy page as Markdown" button (and a matching ?raw URL) so AI assistants and humans can grab the raw markdown without scraping the rendered HTML.
Core:
$getReconciledDirectionLexicalNode callers move a node out of its parentDOMSlot and add DOMRenderExtension override surface; markSelection rewritten on topNormalizeTripleClickSelectionExtensionElementNode import/export of data-lexical-indent$updateDOMSelectionRangeSelection.isBackward() on the instanceNodeMap and reconciler keyToDOMMap$reconcileChildren<br> reconciledir attribute in importDOMdisplay style in isBlockDomNode / isInlineDomNode--lexical-indent-base-value via CSS var() instead of pre-computing in JSsetRootElementdeleteContentBackward with targetRange$setBlocksTypeDecoratorNode$reconcileChildren fast path during full reconcileMOVE_TO_END / MOVE_TO_START crash on decorator-only elementsMOVE_TO_END / MOVE_TO_STARTHTML / DOM:
DOMImportExtension — composable replacement for importDOM with rule-based matchers and DOM preprocessingdisabledForEditor / disabledForSession predicates on domOverrideCode:
null Tokenizer.defaultLanguage to preserve markdown ``` round-trip<br> elements in pasted codeClipboard:
GetClipboardDataExtensionExtension:
NormalizeInlineElementsExtension (also wired into rich/plain text)NormalizeTripleClickSelectionExtensionClickAfterLastBlockExtension$canIndentHistory:
canUndo / canRedo ReadonlySignals on HistoryExtensionmaxDepth option for bounding the undo stackLink / List:
$setFormatFromDOM; ListItemNode imports alignment from DOMListNode.createListItemNode factory for subclassesMarkdown:
*/_/~)$convertSelectionToMarkdownString APIReact:
onClose for LexicalTypeaheadMenuPlugineditorState.read() in markSelectionExtensionComponent support for output components with required propsonOpenEmbedModalForConfig prop optional in LexicalAutoEmbedPluginRich Text / Plain Text:
escapeFormatTriggers on RichTextExtensionDecoratorNode NodeSelectionTable:
pointerdown handler when root element is set after registerYjs:
TextNodes in collab v2RenderSnapshot comment typoPlayground:
FloatingLinkEditor correctly for multi-line / decorator-only links and near the editor's bottom edge<details> with loose body contentPagesExtension to be disabled by ActionsPlugin (HTML & markdown mode)font-size for h2EquationNode click → NodeSelection; empty-input Backspace removesWebsite / Examples:
editorState null vs undefined and empty-state pitfallNodeState in $config JSON serializationLexicalNodeReplacement and withKlass@lexical/react plugin docsdev-node-state-style into examples/node-state-styleskipLibCheck in react-rich for lib-types regression coverage (#7093)update-team-datadocusaurus-plugin-internaldocs-fb presetembed=1 from non-iframe StackBlitz links/docs/error page from undefined processInfrastructure:
browserslistArrowDown workaround in Tables.spec.mjswindows-2022playwright install-deps instead of apt-get@playwright/test to ^1.60.0release.js to release.mjscreateListItemNode method to the ListNode and use it for children normalization by @levensta in https://github.com/facebook/lexical/pull/8427$setFormatFromDOM function and use it to import alignment for ListItem by @levensta in https://github.com/facebook/lexical/pull/8460onOpenEmbedModalForConfig prop optional in LexicalAutoEmbedPlugin by @levensta in https://github.com/facebook/lexical/pull/8485$canIndent by @levensta in https://github.com/facebook/lexical/pull/8510$setBlocksType by @flavorjones in https://github.com/facebook/lexical/pull/8517Full Changelog: https://github.com/facebook/lexical/compare/v0.44.0...v0.45.0
lexical, @lexical/html, @lexical/selection, @lexical/utils: DOMSlot generalized (#8519)
DOMSlot can describe arbitrary DOM containers and
DOMRenderExtension overrides flow through $getDOMSlot. markSelection
is rewritten on top of it.
Detect: overrides of getDOMSlot; code that subclasses or constructs
ElementDOMSlot.
Migration: re-check the types of those overrides; see DOM rendering.
lexical: $getReconciledDirection walks through shadow roots (#8479)
Elements inside shadow roots (for example table cells) inherit direction like other elements.
Detect: code relying on direction inheritance stopping at tables or other shadow roots.
Verify: RTL content inside tables.
lexical, @lexical/rich-text: Backspace at block start preserves the current block (#8493)
Backspace at the start of a non-empty block after an empty block removes the empty block and keeps the current block's type, and a first heading is no longer replaced on every Backspace.
Detect: tests asserting the old merge result or node keys after Backspace.
Migration: update expectations.
Verify: Backspace at the start of headings, quotes, and list items.
lexical: Selection follows nodes moved between parents (#8501)
replace, insertBefore, insertAfter and other callers that
move a node adjust the selection to follow it.
Detect: transforms or update listeners that read selection offsets after moving nodes.
Migration: None, unless code depended on the stale offsets.
Verify: features that move nodes containing the caret.
@lexical/markdown: Markdown shortcuts fire after IME composition (#8503)
Markdown shortcuts typed through IME composition trigger once the composition is committed.
Detect: markdown shortcuts with CJK input methods.
Verify: markdown shortcuts with an IME.
@lexical/extension, @lexical/rich-text, @lexical/plain-text: Empty inline elements are removed (NormalizeInlineElementsExtension) (#8497)
registerRichText / registerPlainText register a transform
that removes empty inline elements such as LinkNode.
Detect: features that intentionally keep empty inline ElementNodes.
Migration: with extensions,
configExtension(NormalizeInlineElementsExtension, {disabled: true});
otherwise make the node non-empty or override the behavior.
Verify: empty links and other inline wrappers.
lexical, @lexical/extension, @lexical/rich-text, @lexical/plain-text: Triple-click normalization moved to NormalizeTripleClickSelectionExtension (#8520)
The core editor no longer normalizes triple-click selection; rich text and plain text register the new extension.
Detect: editors that use neither registerRichText /
registerPlainText nor the matching extensions.
Migration: add NormalizeTripleClickSelectionExtension from
@lexical/extension.
Verify: triple-click a paragraph.
@lexical/selection: getStyleObjectFromRawCSS deprecated (#8447)
Replacement: getStyleObjectFromCSS (it is an alias).
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
Nothing published for this version
🧹 #8324 Override yaml to >=1.10.3 to fix CVE-2026-33532
v0.44.0 is a monthly release with a few minor breaking changes (deprecations), a notable new experimental DOMRenderExtension API for overriding DOM create/update/export, easier to use priority levels for registering commands, a pagination demonstration and convenient html import/export in the playground, better drag and drop support, automatic inline of CSS for HTML import, consistent CSP-safe style updates, and a wide range of bug fixes and other new features.
@lexical/offset OffsetView (#8350)OffsetView / $createOffsetView never worked correctly, has no documentation, no tests, and no usage in the monorepo. It has been deprecated. The only function still in use, $createChildrenArray, is now exported from lexical itself — import it from lexical rather than @lexical/offset going forward.
CodeExtension (#8360)The "press Enter three times to exit a CodeNode" logic has moved from CodeNode.insertNewAfter to a KEY_ENTER_COMMAND listener registered by CodeExtension. This fixes paste-with-blank-lines incorrectly escaping the code block. Using CodeNode without CodeExtension is now deprecated — a backwards-compatible shim with a dev-mode warning is in place, but the node is expected to stop working without CodeExtension in a future version.
lexical / @lexical/html — Extensible DOM rendering and export (experimental) (#8353, #8368)A new DOMRenderExtension (in @lexical/html) and EditorDOMRenderConfig (in lexical) parameterize $createDOM, $updateDOM, $exportDOM, $getDOMSlot, $shouldInclude, and $shouldExclude so that node rendering and export can be overridden via composable middleware. Use domOverride(nodes, config) to target one or more node classes, predicates, or '*' (wildcard), and call $next() from inside an override to delegate to the underlying implementation.
A new $decorateDOM(nextNode, prevNode, dom, editor) hook runs after a node is created/updated and after its children have been reconciled, intended for in-place attribute or DOM tweaks. Override ordering is a well-defined topological sort: wildcards highest, then predicates, then class hierarchy (subclass before superclass), with extension dependency order and registration order as tiebreakers.
Render-context APIs are also exposed: $withRenderContext, $getRenderContextValue, contextValue, contextUpdater, RenderContextRoot, RenderContextExport. New traversal helpers $generateDOMFromNodes and $generateDOMFromRoot populate a container using the configured render config. CreateEditorArgs.dom accepts a Partial<EditorDOMRenderConfig> to override rendering at editor creation. $isLexicalNode is also exported from lexical.
lexical — COMMAND_PRIORITY_BEFORE_* priorities (#8375)Five new command priorities — COMMAND_PRIORITY_BEFORE_EDITOR, _BEFORE_LOW, _BEFORE_NORMAL, _BEFORE_HIGH, _BEFORE_CRITICAL — register listeners that run most-recently-registered first, in front of the existing first-registered-first listeners at the same priority. Ordering is: highest priority first, then all BEFORE_* listeners (LIFO), then legacy listeners (FIFO). The new priorities are almost always what you want for new code; legacy priorities are unchanged so this is purely additive. See the new "Priorities and ordering" docs.
@lexical/code-prism — CodePrismExtension & @lexical/code-shiki — CodeShikiExtension (#8346)Both packages now export proper extensions (CodePrismExtension, CodeShikiExtension) with {disabled, tokenizer} signal-based configuration that can be toggled and hot-swapped at runtime. The legacy CodeHighlighterShikiExtension is kept as a deprecated backwards-compatible shim.
@lexical/link / @lexical/react — Custom AutoLink punctuation (#8378)AutoLinkExtension, registerAutoLink, and LexicalAutoLinkPlugin now accept an optional punctuation setting to override the default boundary characters (e.g. to allow colon-delimited matches without breaking URLs that contain colons).
@lexical/utils — removeEmptyDestination for split-at-caret (#8384)SplitAtPointCaretNextOptions (used by $insertNodeToNearestRootAtCaret and $splitAtPointCaretNext) gains a removeEmptyDestination option for finer control over whether an empty destination is replaced entirely.
@lexical/clipboard — Shared drop handlers (#8373)New $handleRichTextDrop and $handlePlainTextDrop helpers implement Lexical-aware text drag-and-drop, including same-block drags, cross-TextNode and cross-block drops, DecoratorNode preservation, and cross-editor drags. registerRichText and registerPlainText now wire these by default.
@experimental) (#8354)@lexical/extension (since v0.36.1, Sep 2025) and the NodeState API in lexical (since v0.26.0, Feb 2025) are now formally stable.
@lexical/offset OffsetView / $createOffsetView (use $createChildrenArray from lexical) (#8350)@lexical/text $findTextIntersectionFromCharacters — broken, untested, undocumented (#8364)CodeHighlighterShikiExtension / CodeHighlighterShikiConfig (use CodeShikiExtension) (#8346)CodeNode without CodeExtension (#8360)Core:
OffsetView; export $createChildrenArray from lexicalEditorDOMRenderConfig, DOMRenderExtension, domOverride, $decorateDOM, render context, $generateDOMFromNodes, $generateDOMFromRoot, $isLexicalNode, CreateEditorArgs.domCOMMAND_PRIORITY_BEFORE_* priorities for last-registered-called-first ordering@experimental from Extension and NodeState APIsClipboard / Rich Text / Plain Text:
DecoratorNodes and formatting are preserved across drops; cross-editor drags work even with two Lexical versions on the same pageCode:
KEY_ENTER_COMMAND listener in CodeExtension; fixes blank-line paste escaping the code blockCodePrismExtension (@lexical/code-prism) and CodeShikiExtension (@lexical/code-shiki)shiki to ^4.0.2Extension:
react type dependency from DecoratorTextNodeLexicalExtensionEditorComposer no longer disposes the editor on unmount; lifetime is the caller's responsibility (fixes nested/caption editors after remount)HTML / Table:
<style> tags during HTML import (fixes paste from Excel, Outlook, etc.)<li> during HTML export, eliminating duplicate ordered-list numberingLink:
List:
ListItemNode always has a ListNode parent (orphans are merged or floated to root)pointerup<li> on HTML exportMarkdown:
\d+\. ) inside bullet/check list item exports to fix double-escape on round-tripPlayground:
PagesExtension with PageNode, PageContentNode, PageSetupNode for paginated documents and print-friendly output$generateHtmlFromNodes / $generateNodesFromDOM); HTML view formatted with prettierPageBreak, Twitter, YouTube, Figma, TabFocus, Collapsible, SpecialText, code-highlight) and remove the dead LinkPlugin and StickyPlugin filesNodeContextMenuPlugin falls back to the root node when the click target has no Lexical node, instead of showing an empty menu@floating-ui/react for FloatingLinkEditorPlugin positioning; correctly handles all viewport boundaries and Firefox focusNode.parentElement quirksReact:
editorRef is null in LexicalEditorRefPluginyjs as an optional peer dependency for Yarn PnP compatibilityLexicalExtensionEditorComposerNodeContextMenuPluginText:
$findTextIntersectionFromCharactersUtils:
$insertNodeToNearestRootAtCaret edge cases; add removeEmptyDestination to SplitAtPointCaretNextOptionsRefactor (CSP-safe styles):
cssText / setAttribute('style', …) writes with property-based style updates across lexical, @lexical/code-core, @lexical/list, @lexical/table, @lexical/yjs, and the playgroundWebsite:
tsconfig.json for lexical-website so type errors are actually surfaced in CIInfrastructure:
$config in AGENTS.mdyaml to >=1.10.3 to fix CVE-2026-33532simple-git dependency vulnerabilityfollow-redirects dependency vulnerabilityCOMMAND_PRIORITY_BEFORE_* priorities for last-registered-called-first order by @etrepum in https://github.com/facebook/lexical/pull/8375Full Changelog: https://github.com/facebook/lexical/compare/v0.43.0...v0.44.0
@lexical/code, @lexical/code-core: Code block "Enter three times to exit" moved to CodeExtension (#8360)
The logic moved from CodeNode.insertNewAfter to a
KEY_ENTER_COMMAND listener in CodeExtension. Without CodeExtension,
CodeNode falls back to a shim with a dev warning (that use is deprecated;
see Deprecations).
Detect: CodeNode registered in nodes without CodeExtension.
Migration: add CodeExtension (from @lexical/code or
@lexical/code-core) to your extensions.
Verify: exiting code blocks with Enter; pasting blank lines into code.
lexical, @lexical/offset: OffsetView and $createOffsetView deprecated; $createChildrenArray moved to lexical (#8350)
Replacement: import $createChildrenArray from lexical (the @lexical/offset export is a deprecated alias). OffsetView never worked correctly and has no replacement.
Removal: not scheduled.
@lexical/code-shiki: CodeHighlighterShikiExtension and CodeHighlighterShikiConfig deprecated (#8346)
Replacement: CodeShikiExtension from @lexical/code-shiki.
Removal: no earlier than v0.53.0; #9316 removes it after v0.52.0.
@lexical/code: Using CodeNode without CodeExtension deprecated (#8360)
Replacement: register CodeExtension.
Removal: not scheduled.
@lexical/text: $findTextIntersectionFromCharacters deprecated (#8364)
Replacement: none; it never worked correctly.
Removal: not scheduled.
@lexical/selection: getStyleObjectFromCSS moved to lexical; $addNodeStyle deprecated (#8372)
Replacement: import getStyleObjectFromCSS from lexical. $addNodeStyle is no longer needed: node styles are parsed on demand.
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
v0.43.0 is a monthly release with a minor breaking change, new features, and a number of bug fixes across selection, tables, markdown, and extensions.…
v0.43.0 is a monthly release with a minor breaking change, new features, and a number of bug fixes across selection, tables, markdown, and extensions. Notable highlights include a new useExtensionSignalValue hook, and CSS theme options for Yjs collaboration cursors.
Outside of the release artifact, we've refreshed the lexical.dev website thanks to @m-santanna (and inspired by design mockups from @ixahmedxi). Importantly this refresh includes a set of modern examples (examples/website-* and examples/agent-example) that are embedded on the front page and showcase current best practices.
@lexical/react nested editors now use asynchronous parent editor delegation when needed to match pre-0.42.0 legacy behavior.
@lexical/react - useExtensionSignalValue #8286A new @lexical/react/useExtensionSignalValue module is available for reading signal values from extension output within React components
Core:
IS_SAFARI browser detectionTextNodes when __state contains a different number of default values$insertNodes with $insertNodeIntoLeaf for consistent DecoratorNode behavior inside MarkNodeCode:
skipTransforms in CodeHighlighterPrism and CodeHighlighterShikiExtension:
@lexical/react/useExtensionSignalValue module for reading signals from ReactExamples:
Headless:
window.happyDOM.close() to ensure proper cleanupLink:
Markdown:
Playground:
isExactShortcutMatch for Dvorak keyboard compatibilitySelection:
$getSelectionStyleValueForProperty direction-independentTable:
Utils:
$insertNodeIntoLeaf edge case; update @preact/signals-core, hermes, and flow dependenciesYjs:
Infrastructure:
^7.3.2flow-bin to 0.306.0 and add incompatible-variance workaroundusing)Full Changelog: https://github.com/facebook/lexical/compare/v0.42.0...v0.43.0
@lexical/react: Nested editors delegate to the parent asynchronously when needed (#8308)
Nested editors use asynchronous parent editor delegation when needed, matching behavior before v0.42.0.
Detect: LexicalNestedComposer users whose parent listeners react to
nested editor events.
Verify: commands and updates in nested editors.
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
[lexical] Chore: Fix minimatch CVE-2026-26996 in example projects by @thatmichael85 in https://github.com/facebook/lexical/pull/8169
v0.42.0 is a monthly release with a huge number of fixes and features from a lot of new contributors. The most notable fixes are related to tables, links, extensions, and markdown. @lexical/eslint-plugin is now fully compatible with eslint 9+. The production builds are also now generated in an ascii-only format which may considerably reduce memory usage in some deployment environments.
@lexical/code #8198Prism highlighting now lives in @lexical/code-prism and the Prism related functionality in @lexical/code is now deprecated. Transitionally, there is a @lexical/code-core package which has the implementation of Lexical's code functionality without a Prism dependency.
Due to its experimental nature and incomplete implementation, the in-progress hasFitNestedTables functionality has been moved to the playground
lexical - $copyNode + LexicalNode.resetOnCopyNodeFrom & NodeState resetOnCopyNodeAfter $copyNode is used it now calls copiedNode.resetOnCopyNodeFrom(originalNode) which will reset every NodeState that has resetOnCopyNode: true in its configuration. Subclasses can override this method to reset other "ephemeral" state such as whether a ListNodeItem is checked or not.
Note that this does not influence serialization or copy and paste operations, it only affects calls to $copyNode.
@lexical/utils - $insertNodeIntoLeafThe current behavior RangeSelection.insertNodes can split an inline ElementNode (e.g. a LinkNode) when inserting content, even if that content is also inline and could be a child of the given node. $insertNodeIntoLeaf is now provided to insert a node without splitting any containing nodes.
Core:
Code:
@lexical/code-prism and add @lexical/code-core to provide a dependency that does not include Prism. @lexical/code remains backwards compatible with Prism included, but you should migrate to using highlighting from @lexical/code-shiki or @lexical/code-prism.Devtools:
Extension:
Markdown:
Link:
Eslint Plugin:
@lexical/eslint-pluginList:
React:
Table:
SELECTION_CHANGE_COMMAND and deselection handlerUtils:
Misc:
Infrastructure
Playground:
EditorThemeClasses by @levensta in https://github.com/facebook/lexical/pull/8190afterCloneFrom method to LinkNode/AutoLinkNode by @levensta in https://github.com/facebook/lexical/pull/8226Full Changelog: https://github.com/facebook/lexical/compare/v0.41.0...v0.42.0
@lexical/react: LexicalContextMenuPlugin removed (#8199)
@lexical/react/LexicalContextMenuPlugin, deprecated since v0.32.0, is removed.
menuRenderFn becomes optional on LexicalTypeaheadMenuPlugin,
LexicalNodeMenuPlugin and LexicalAutoEmbedPlugin; a default renderer is
used when it is omitted.
Detect: imports from @lexical/react/LexicalContextMenuPlugin.
Migration: use LexicalNodeContextMenuPlugin from
@lexical/react/LexicalNodeContextMenuPlugin. The playground's
ContextMenuPlugin
is an example.
@lexical/code, @lexical/code-prism, @lexical/code-core: Prism highlighting moved to @lexical/code-prism (#8198)
Prism highlighting lives in @lexical/code-prism; the Prism
exports of @lexical/code are deprecated re-exports (removed in v0.51.0).
Detect: imports of registerCodeHighlighting, PrismTokenizer,
getCodeLanguages, CODE_LANGUAGE_MAP, and related helpers from
@lexical/code.
Migration: add @lexical/code-prism and import these from it. See the v0.51.0 entry
"Prism re-exports removed from @lexical/code" for the full list.
@lexical/table, @lexical/react: hasFitNestedTables removed (#8210)
The experimental hasFitNestedTables option moved to the
playground.
Detect: hasFitNestedTables passed to TablePlugin, TableExtension,
or registerTablePlugin.
Migration: remove the option, or copy the playground implementation.
@lexical/react: HorizontalRulePlugin deprecated (#8202)
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
One column per quarter.