unstale

npm / lexical

lexical

What changed in lexical 0.38 to 0.52, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

61 breaking2 security22 deprecations113 new APIs and options6 performance70 behavior and defaults2 tooling146 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

lexical 0.5220 changes

Breaking changes 4

  • Works with buildEditorFromExtensions for server-side processing and tests, marks the editor headless, prevents attaching a DOM root, and keeps listener registration methods available.

    0.52.0release notes

  • Removed; use $getCommonAncestor(a, b)?.commonAncestor ?? null, passing parents of non-element nodes when the old behavior is needed.

    0.52.0release notes

  • Replace this deprecated output type with MdastExtensionOutput.

    0.52.0release notes

  • Replace this deprecated output type with MdastExtensionOutput.

    0.52.0release notes

Deprecations 2

  • Deprecated alias of MdastExtension; move configuration to MdastExtension.

    0.52.0release notes

  • Deprecated alias of MdastExtension; move configuration to MdastExtension.

    0.52.0release notes

New APIs and options 2

  • Import/export middleware can delegate conversion of the same node to remaining handlers, then return or modify their output; null and [] retain distinct meanings.

    0.52.0release notes

  • A unified Markdown extension now owns import and export; feature extensions include it automatically, and export rules can target node classes or type strings and apply to subclasses.

    0.52.0release notes

Behavior and default changes 2

  • Default HTML export now honors DOMRenderExtension $createDOM overrides, which can change exported HTML for nodes inheriting or calling the default export.

    0.52.0release notes

  • The command now runs before DOM reconciliation inside the pending writable update; selection reads, listener edits, tags, and error handling follow that update's contract.

    0.52.0release notes

Fixes and other changes 10

  • Dropping dragged text on the edge of its own selection no longer deletes it.

    0.52.0release notes

  • Backspace over all text in the first block preserves the empty block and its type.

    0.52.0release notes

  • Focus commands triggered during DOM selection synchronization no longer produce spurious read-only warnings; dispatching from an explicit read context still warns.

    0.52.0release notes

  • Lexical-controlled caret moves reveal the caret in code blocks and other horizontally scrolling containers, including table wrappers; scrolling respects scroll-padding.

    0.52.0release notes

  • The workaround after handled Backspace or select-all is limited to macOS Chromium, preventing legitimate text input from being discarded on other platforms.

    0.52.0release notes

  • iOS tracks explicit Shift key events so Shift+Enter can insert a line break without treating automatic capitalization as Shift.

    0.52.0release notes

  • Correctly resolves endpoints inside text-bearing inline decorators.

    0.52.0release notes

  • Highlights retain coverage across mixed font sizes and partially overlapping rectangles.

    0.52.0release notes

  • Restores an editable paragraph when the root still contains slots such as footnotes.

    0.52.0release notes

  • A childless root now warns and recovers to an empty paragraph in production; development builds still report the invalid state through onError.

    0.52.0release notes

lexical 0.5119 changes

Breaking changes 5

  • A production import of only createCommand no longer retains the editor.

    0.51.0release notes

  • npm packages are ESM-only and provide no require export condition. CommonJS consumers need Node.js 20.19+ or dynamic import; load shared dependencies as ESM to avoid duplicate instances.

    0.51.0release notes

  • A property declared with withField is read directly from the node, so exportJSON no longer resolves getLatest() for a retained reference. Call getLatest() yourself after mutations.

    0.51.0release notes

  • Deprecated Prism re-exports and the @lexical/code-prism dependency are removed. Import the listed Prism utilities from @lexical/code-prism instead.

    0.51.0release notes

  • Merging cells no longer keeps the empty paragraph of the target cell.

    0.51.0release notes

Deprecations 1

  • LexicalComposer is deprecated in favor of LexicalExtensionComposer; it cannot accept extensions and is expected to be removed in a future major.

    0.51.0release notes

New APIs and options 4

  • Flow declarations can now express an extension with dependencies.

    0.51.0release notes

  • The package now publishes one subpath export per extension, such as @lexical/extension/AutoFocusExtension; the barrel import is unchanged.

    0.51.0release notes

  • Declarative serialization schemas let nodes using $config declare serialized properties once, driving importJSON, updateFromJSON, and exportJSON; most custom nodes no longer need JSON serialization code.

    0.51.0release notes

  • editorState.toJSON(true) opts into compact JSON export, omitting schema-default properties, parser-derived properties, and the deprecated version field. Compact JSON requires readers that know the schemas.

    0.51.0release notes

Performance 1

  • Built-in node classes ship with straight-line serialization generated from their schemas at build time, providing faster import and export with byte-identical JSON to the schema-driven path.

    0.51.0release notes

Behavior and default changes 2

  • Selection overlay listeners are now notified when rectangles are removed.

    0.51.0release notes

  • A text entity now keeps the style and detail of the text it replaces.

    0.51.0release notes

Fixes and other changes 6

  • Flow types now allow defineExtension to be called, making extension types usable.

    0.51.0release notes

  • Text left outside a Markdown link now keeps its format.

    0.51.0release notes

  • Indenting between two nested lists no longer converts the second list's type.

    0.51.0release notes

  • Removing text from a caret range no longer leaves a childless list or table as the root's only child.

    0.51.0release notes

  • Safari link selection no longer dispatches a redundant selection-change command.

    0.51.0release notes

  • setMode, setTextContent, and isSimpleText now read the latest state.

    0.51.0release notes

lexical 0.5056 changes

Breaking changes 10

  • A getXmlText or getXmlElement result with an un-integrated or misnamed type now throws an invariant instead of failing later.

    0.50.0release notes

  • The Lexical JSON clipboard payload now calls excludeFromCopy with 'clone' instead of 'html', so custom implementations keyed on 'html' for this channel should be updated.

    0.50.0release notes

  • An insertText anchor that is not a text node now throws an invariant instead of failing later.

    0.50.0release notes

  • An empty KeyboardShortcutMatch key now throws an invariant instead of failing later.

    0.50.0release notes

  • Yjs collaboration no longer syncs root textFormat or textStyle.

    0.50.0release notes

  • Replacing a named slot value through the tree API now fails with an actionable invariant; use $setSlot on the owning host instead.

    0.50.0release notes

  • No longer re-homes named slots when replacing a node, which can affect code relying on slots moving to the replacement.

    0.50.0release notes

  • Only RootListener and EditableListener are typed to return cleanup functions; returning one from another listener is now a TypeScript error.

    0.50.0release notes

  • Now rejects an empty selector group.

    0.50.0release notes

  • Deleting or cutting a whole-document selection now removes top-level blocks, leaving a fresh empty paragraph; Cmd+X carries those blocks so pasting restores them.

    0.50.0release notes

Deprecations 4

  • Deprecated in favor of the canRedo signal on HistoryExtension, which holds the current value for listeners registered after initialization.

    0.50.0release notes

  • Deprecated in favor of HistoryExtension signals.

    0.50.0release notes

  • Deprecated in favor of the canUndo signal on HistoryExtension, which holds the current value for listeners registered after initialization.

    0.50.0release notes

  • Deprecated in favor of HistoryExtension signals.

    0.50.0release notes

New APIs and options 16

  • Announces to screen readers when typing turns text into a link and is enabled by default with AutoLinkExtension.

    0.50.0release notes

  • Adds compiled keyboard shortcut dispatch and related core constants and platform-mask helper for declaring and matching shortcuts.

    0.50.0release notes

  • Supports custom Yjs XmlText through CreateBindingV2Options__EXPERIMENTAL, allowing a Lexical document inside a larger shared type.

    0.50.0release notes

  • Allows a custom Yjs XmlText so a Lexical document can live inside a larger shared type.

    0.50.0release notes

  • Adds a new core export for accessing the selection slot frame.

    0.50.0release notes

  • Announces heading changes to screen readers and is enabled by default through RichTextExtension.

    0.50.0release notes

  • Keeps an editor alive across hot module replacement, with HMRConfig, HMROutput, and HotContext.

    0.50.0release notes

  • Adds an extension for declaring named keyboard shortcuts and formatting them for the current platform.

    0.50.0release notes

  • Markdown import restructures nested mixed-type lists and stores code-fence metadata in a new mdCodeMeta node state.

    0.50.0release notes

  • Adds a config option that lets files take precedence over incidental HTML when pasting.

    0.50.0release notes

  • Accepts an optional third argument to let an app decide whether pasted files take precedence over incidental text/html.

    0.50.0release notes

  • Adds a rich-text configuration callback so an app can decide whether pasted files take precedence over incidental text/html; the default remains unchanged.

    0.50.0release notes

  • Adds an opt-in overlay for pasted Word lists.

    0.50.0release notes

  • An opt-in extension reconstructs list structure from Microsoft Word HTML on paste.

    0.50.0release notes

  • Opt-in support reconstructs list structure from Microsoft Word HTML on paste.

    0.50.0release notes

  • Allows a custom Yjs XmlText to be used for collaboration.

    0.50.0release notes

Performance 1

  • Bulk inserts and removals no longer walk parent children to compute an unused selection offset, avoiding quadratic operations.

    0.50.0release notes

Behavior and default changes 9

  • Prioritizes file transfer over text/html when pasting browser-copied images.

    0.50.0release notes

  • Rich text announces heading changes by default for accessibility.

    0.50.0release notes

  • JSON deserialization now builds through $create, applying registered node replacements and running the replacement class's importJSON.

    0.50.0release notes

  • Moves into core and remains re-exported from @lexical/utils.

    0.50.0release notes

  • Builds nodes with $create when importing JSON, applying node replacements during import.

    0.50.0release notes

  • Screen reader users are told when typing turns text into a link.

    0.50.0release notes

  • Middle-clicking links now opens them in a new tab.

    0.50.0release notes

  • RichTextExtension enables heading and auto-link screen reader announcements by default through a live region appended to document.body or the configured owner; announcements can be disabled.

    0.50.0release notes

  • Applying a link to a NodeSelection now applies the title attribute.

    0.50.0release notes

Tooling 1

  • A new Rollup and Vite plugin injects pure annotations and inlines trivial side-effect-free factories at build time, removing the need for hand-written annotations on those calls.

    0.50.0release notes

Fixes and other changes 15

  • Newly inserted AutoLinkNode instances now keep the original node's properties.

    0.50.0release notes

  • Cloning an EditorState now keeps _parsed.

    0.50.0release notes

  • When exportDOM returns a DocumentFragment, its after() replacement is now applied.

    0.50.0release notes

  • A trailing LineBreakNode in a block exports an extra managed <br>, matching the live DOM so the line break survives export/import round trips.

    0.50.0release notes

  • Inserting a block at the end of a paragraph no longer leaves an empty paragraph behind.

    0.50.0release notes

  • Inserting text no longer throws when the caret is inside a segmented TextNode.

    0.50.0release notes

  • LinkNode and AutoLinkNode getters now read the latest state.

    0.50.0release notes

  • A fully selected paragraph with alignment, indent, or inline style remains a block in copied content instead of losing its formatting.

    0.50.0release notes

  • Replacing a node with a sibling now keeps the parent's size correct.

    0.50.0release notes

  • Now forwards the parent's maxDepth to shared history.

    0.50.0release notes

  • Shared history stacks now record the state of the editor that actually changed.

    0.50.0release notes

  • Only one client may bootstrap a nested editor's document, preventing a spurious leading paragraph in image captions or sticky notes.

    0.50.0release notes

  • Reinserting a node after a range no longer creates a sibling cycle.

    0.50.0release notes

  • The object payload no longer discards configured link attributes.

    0.50.0release notes

  • The object payload no longer discards configured link attributes.

    0.50.0release notes

lexical 0.4925 changes

Breaking changes 5

  • Built-in node classes now use the $config protocol; ported nodes no longer have static importJSON, importDOM, clone, or transform methods. Use the higher-level equivalents instead.

    0.49.0release notes

  • Unrestricted CSS selector groups are now evaluated against all elements instead of only tag-matched elements.

    0.49.0release notes

  • The helper was renamed from isNestedListNode to follow the dollar-prefixed naming convention.

    0.49.0release notes

  • Typing a list marker at the start of a heading no longer converts the heading into a list.

    0.49.0release notes

  • The node type field is now readonly, and built-in node constructors require zero-argument defaults.

    0.49.0release notes

Deprecations 2

  • Deprecated in favor of $createTableSelectionFrom, which takes the table node and anchor/focus cells and validates them.

    0.49.0release notes

  • Deprecated because it computes incorrect bounds for merged cells; use $computeTableCellRectBoundary with $computeTableMap instead.

    0.49.0release notes

New APIs and options 5

  • Use this newly exported alias instead of unsafe LexicalCommand<unknown> usage now that LexicalCommand payload types are invariant.

    0.49.0release notes

  • Now exported for computing table cell rectangle boundaries; use it with $computeTableMap instead of getShape.

    0.49.0release notes

  • Creates a table selection from the table node and anchor/focus cells, validating them instead of returning a blank selection with placeholder root keys.

    0.49.0release notes

  • Set this table config option to true to keep the horizontal scrollbar for overflowing tables anchored at the viewport bottom.

    0.49.0release notes

  • Use this new theme key to style the sticky horizontal scrollbar for tables.

    0.49.0release notes

Behavior and default changes 2

  • The table DOM omits colgroup when column widths are undefined, allowing browser auto-sizing, and creates or removes it dynamically as widths change.

    0.49.0release notes

  • The payload argument is optional when a command's payload type is undefined or void.

    0.49.0release notes

Fixes and other changes 11

  • Pressing ArrowUp before a leading non-inline decorator no longer moves the selection out of the editor.

    0.49.0release notes

  • The synthesized clone now applies afterCloneFrom when called directly, preventing silent property loss across core nodes.

    0.49.0release notes

  • Cmd/Ctrl-based delete-line shortcuts now work inside table cells instead of being swallowed.

    0.49.0release notes

  • Updates dispatched from a read-only context now run in a fresh writable update instead of being dropped, with a development warning.

    0.49.0release notes

  • Firefox now creates a selection and shows the block cursor when clicking in the gap between block decorators.

    0.49.0release notes

  • The synthesized getType no longer returns a superclass type when inherited or recurses infinitely when copied onto a subclass, fixing node-type collisions and compiled-build stack overflows.

    0.49.0release notes

  • QuoteNode.updateDOM now accepts the EditorConfig argument passed by the reconciler, matching other nodes.

    0.49.0release notes

  • Redundant explicit type parameters were dropped from registerCommand call sites.

    0.49.0release notes

  • Redundant explicit type parameters were dropped from registerNodeTransform call sites.

    0.49.0release notes

  • Concurrent asynchronous language and theme loads are deduplicated and merged into one history entry, avoiding spurious undo states.

    0.49.0release notes

  • Alignment now works when cells are selected in any direction, not only top-left to bottom-right.

    0.49.0release notes

lexical 0.4816 changes

Breaking changes 1

  • Unparseable URLs now fail closed, preventing a potential XSS vector.

    0.48.0release notes

Security 1

New APIs and options 3

  • Added an extension for extending the Markdown ↔ mdast pipeline with custom constructs.

    0.48.0release notes

  • Added a helper for reordering table rows.

    0.48.0release notes

  • The shared-type root name is customizable, allowing Lexical to share a Yjs document with content that uses a different root key.

    0.48.0release notes

Behavior and default changes 3

  • Backspace now outdents the item or converts it to a paragraph.

    0.48.0release notes

  • The table auto-scrolls when drag-selecting cells past the visible edge.

    0.48.0release notes

  • Tables can now be copied in read-only mode.

    0.48.0release notes

Fixes and other changes 8

  • Block separators are counted when wrapping character-limit overflow.

    0.48.0release notes

  • Code is re-tokenized after an asynchronous language load so highlighting appears when the grammar is ready.

    0.48.0release notes

  • Disabled autolinks no longer open links.

    0.48.0release notes

  • Overlapping inline formats now roundtrip correctly through mdast and Markdown.

    0.48.0release notes

  • Text dragovers are no longer canceled, restoring native text drops.

    0.48.0release notes

  • Skips scrollIntoViewIfNeeded when the selection rectangle is above the editor, fixing a Safari RTL caret jump.

    0.48.0release notes

  • Added the previously missing export for $unmergeCellNode.

    0.48.0release notes

  • Adjacent OverflowNodes are merged in useCharacterLimit.

    0.48.0release notes

lexical 0.4724 changes

Breaking changes 3

  • No longer removes adjacent block decorators.

    0.47.0release notes

  • React 18 is now the minimum supported version; react and react-dom peerDependencies require >=18, and React 17 compatibility code paths were removed.

    0.47.0release notes

  • Sets the selection's text format instead of toggling it.

    0.47.0release notes

New APIs and options 8

  • Parses a Markdown string into Lexical nodes without inserting them into the document or modifying the selection.

    0.47.0release notes

  • Returns the owner document of the active editor, including in a Shadow DOM or iframe, and falls back to the global document when there is no active editor.

    0.47.0release notes

  • Exports the table-column insertion utility.

    0.47.0release notes

  • Exports the table-row insertion utility.

    0.47.0release notes

  • Adds a type-safe addEventListener helper that returns a cleanup function.

    0.47.0release notes

  • Adds type-safe addEventListener helpers that return cleanup functions.

    0.47.0release notes

  • Adds a utility for setting whether a table column is a header.

    0.47.0release notes

  • Adds a utility for setting whether a table row is a header.

    0.47.0release notes

Behavior and default changes 2

  • Defers onUpdate callbacks during nested commits.

    0.47.0release notes

  • Pasted TSV text now spreads across table cells.

    0.47.0release notes

Fixes and other changes 11

  • ArrowUp and ArrowDown no longer skip block decorators.

    0.47.0release notes

  • Fence-like lines inside a code block stay content, and formatting is prevented on TabNode inside code blocks.

    0.47.0release notes

  • No longer overwrites the X11 PRIMARY selection via Selection.modify.

    0.47.0release notes

  • Prevents text duplication on iOS Safari when formatting during composition.

    0.47.0release notes

  • Fixes navigation across unmergeable TextNode boundaries in inline-grid containers.

    0.47.0release notes

  • Re-resolves a detached firstBlock.

    0.47.0release notes

  • Properly handles block-end focus in backward selections.

    0.47.0release notes

  • Keeps the selection inside single-child inline elements.

    0.47.0release notes

  • Deduplicates speech-to-text insertion on Android Chrome.

    0.47.0release notes

  • A segmented TextNode temporarily switches to normal mode during IME composition, preserving its node key and DOM element until composition ends.

    0.47.0release notes

  • Skips zero-width space insertion for format mismatch on Android Chrome.

    0.47.0release notes

lexical 0.4651 changes

Breaking changes 12

  • A subset of exports deprecated in v0.32.1 has been removed from lexical-link, lexical-list, and lexical-react, so imports of those exports must be updated.

    0.46.0release notes

  • Copying or exporting a NodeSelection containing an ElementNode now includes its children instead of serializing a childless shell.

    0.46.0release notes

  • Passing the root element now resolves to RootNode instead of null; external callers relying on null must update. Selection capture also applies to any subtree marked with setDOMUnmanaged.

    0.46.0release notes

  • Moves getScrollParent to @lexical/utils, changing the package from which consumers import it.

    0.46.0release notes

  • The deprecated export was removed; use $insertList from an update or command listener.

    0.46.0release notes

  • The boundary no longer wraps react-error-boundary and accepts an optional fallback prop; omitting it uses the default message, while null renders nothing.

    0.46.0release notes

  • Code spans now bind tighter than text-match transformers, and inline code spans can contain backticks.

    0.46.0release notes

  • The ContentEditable Props type alias was removed; use ContentEditableProps.

    0.46.0release notes

  • The method was replaced by editor.read('pending', fn), which reads pending state without flushing.

    0.46.0release notes

  • The deprecated export was removed; use $removeList from an update or command listener.

    0.46.0release notes

  • The function takes a new dirtyLeaves parameter between dirtyElements and normalizedNodes to represent slot-host values.

    0.46.0release notes

  • The deprecated export was removed; use $toggleLink instead.

    0.46.0release notes

Security 1

  • CSS parsing is faster, and regexes and prototype handling are hardened against ReDoS and prototype pollution.

    0.46.0release notes

Deprecations 7

  • The standalone import extension is now a deprecated alias; its removal may come as early as v0.47.0.

    0.46.0release notes

  • The standalone import extension is now a deprecated alias; its removal may come as early as v0.47.0.

    0.46.0release notes

  • The standalone import extension is now a deprecated alias; its removal may come as early as v0.47.0.

    0.46.0release notes

  • The standalone import extension is now a deprecated alias; its removal may come as early as v0.47.0.

    0.46.0release notes

  • Traversal methods now expose non-generic base-type signatures; unsafe generic overloads are deprecated. Replace contextual-type assignments with explicit casts or type guards.

    0.46.0release notes

  • The standalone import extension is now a deprecated alias; its removal may come as early as v0.47.0.

    0.46.0release notes

  • The standalone import extension is now a deprecated alias; its removal may come as early as v0.47.0.

    0.46.0release notes

New APIs and options 10

  • The playground adds Korean IME autocomplete with composition-idle ghost text and a pluggable dictionary.

    0.46.0release notes

  • The configuration protocol supports shared abstract-base configuration and accessor-based nominal typing for stricter subclass checks.

    0.46.0release notes

  • A new helper removes zero-area and contained client rects, cleaning up duplicate or spurious WebKit fake-selection rectangles.

    0.46.0release notes

  • Supports DOM shadow roots through platform selection APIs.

    0.46.0release notes

  • When enabled, arrowing past the end of a terminal code block creates a paragraph and moves the caret into it; the option defaults to false.

    0.46.0release notes

  • Go is now available as a code-language option.

    0.46.0release notes

  • Experimental opt-in slots let a host node own multiple isolated editable regions inside its editor state.

    0.46.0release notes

  • The playground can display non-printing marks, toggled from Settings.

    0.46.0release notes

  • A new optional editor hook handles warnings; the infinite-update-loop guard routes its recoverable warning through it.

    0.46.0release notes

  • Adds block-first select-all behavior, with an opt-in cascadeSelection option for nested editors; select-all is a no-op when everything is already selected.

    0.46.0release notes

Behavior and default changes 6

  • Nodes can be inserted at the block cursor inside a shadow root.

    0.46.0release notes

  • Remote collaborator selections are painted with the CSS Custom Highlight API, retaining the positioned overlay only as a fallback.

    0.46.0release notes

  • Cut-tagged updates receive their own history entry instead of merging with preceding or following keystrokes.

    0.46.0release notes

  • Node-providing extensions now register their own DOM import rules, removing the need to list per-package import extensions for the experimental pipeline.

    0.46.0release notes

  • MarkNode method return types are widened to boolean, affecting type expectations for callers.

    0.46.0release notes

  • Paste-tagged updates receive their own history entry instead of merging with preceding or following keystrokes.

    0.46.0release notes

Fixes and other changes 15

  • Markdown round-tripping now preserves block equations.

    0.46.0release notes

  • Ignores beforeinput and input events in captured decorators.

    0.46.0release notes

  • Exiting a nested code block no longer creates a duplicate paragraph.

    0.46.0release notes

  • Backspace at the start of a top-level list now preserves the preceding DecoratorNode.

    0.46.0release notes

  • Adds a utility to deduplicate selection rectangles and fix duplicate or extra rectangles on WebKit.

    0.46.0release notes

  • Markdown parsing handles inline code spans that contain backticks.

    0.46.0release notes

  • Preserves inline formatting when already-formatted text is wrapped with matching markers.

    0.46.0release notes

  • Inserting inline content ahead of a block now preserves the first LineBreakNode instead of dropping it.

    0.46.0release notes

  • Refreshes the iOS keyboard suggestion bar after Backspace for all locales.

    0.46.0release notes

  • Copying links in Firefox and Safari now preserves the LinkNode wrapper.

    0.46.0release notes

  • Preserves LinkNode wrapping when copying in Firefox and Safari.

    0.46.0release notes

  • Method return types are widened to boolean, allowing subclass overrides.

    0.46.0release notes

  • Normalizes non-inline nodes when inserting them into inline-only parents.

    0.46.0release notes

  • Editors can mount in an open shadow tree while retaining selection, focus, drag-and-drop, IME composition, and floating-UI behavior.

    0.46.0release notes

  • Fixes Safari IME composition behavior when setting text content on a TabNode.

    0.46.0release notes

lexical 0.4571 changes

Breaking changes 8

  • Backspace at the start of a non-empty block now merges the previous block’s children into the current block, preserving the current block’s type and format.

    0.45.0release notes

  • Introduces DOMImportExtension as a replacement for importDOM.

    0.45.0release notes

  • Empty inline elements are removed.

    0.45.0release notes

  • The default Markdown import now preserves hard line breaks.

    0.45.0release notes

  • Moving a node between parents now adjusts the current selection to follow the moved node instead of leaving it at the original slot.

    0.45.0release notes

  • Triple-click paragraph selection normalization moved out of LexicalEvents; editors not using rich-text or plain-text registration must register this extension to retain the behavior.

    0.45.0release notes

  • Triple-click selection handling moves to this extension; applications using the former handling may need to update their extension setup.

    0.45.0release notes

  • A runtime guard detects update listeners or transforms that recursively retrigger and throws a descriptive error after a configurable number of nested updates.

    0.45.0release notes

New APIs and options 27

  • HistoryExtension output now includes a ReadonlySignal indicating whether redo is available.

    0.45.0release notes

  • HistoryExtension output now includes a ReadonlySignal indicating whether undo is available.

    0.45.0release notes

  • Inserts a fresh paragraph and places the caret in it when the user clicks below the last block.

    0.45.0release notes

  • Routes text/html pastes through the DOMImportExtension pipeline.

    0.45.0release notes

  • Serializes the current selection, or a caller-provided range, to a Markdown string.

    0.45.0release notes

  • Adds an API to convert the current selection to a Markdown string.

    0.45.0release notes

  • Adds a ListNode method for creating list item nodes, also used during children normalization.

    0.45.0release notes

  • DOM render overrides can be conditionally disabled for an editor.

    0.45.0release notes

  • DOM render overrides can be conditionally disabled for a session.

    0.45.0release notes

  • Adds an experimental composable middleware-style HTML import API with selector-style matchers, optional child schemas, and DOM preprocessing; legacy importDOM continues to work.

    0.45.0release notes

  • Adds a predicate to conditionally skip a render override for a particular editor.

    0.45.0release notes

  • Adds a predicate to conditionally skip a render override for a particular session.

    0.45.0release notes

  • Adds an override surface for DOM rendering as part of the generalized DOMSlot changes.

    0.45.0release notes

  • RichTextExtension supports opt-in format escape triggers.

    0.45.0release notes

  • Is now exported from @lexical/clipboard for use as a peer dependency by custom clipboard handlers.

    0.45.0release notes

  • Exports GetClipboardDataExtension for use by consumers.

    0.45.0release notes

  • The extension output exposes canRedo as a ReadonlySignal<boolean> so toolbar buttons can subscribe without polling historyState.

    0.45.0release notes

  • The extension output exposes canUndo as a ReadonlySignal<boolean> so toolbar buttons can subscribe without polling historyState.

    0.45.0release notes

  • Adds a maxDepth option that bounds the undo stack, evicting older entries FIFO when the limit is exceeded.

    0.45.0release notes

  • Adds a maxDepth option for tuning the history depth.

    0.45.0release notes

  • The plugin supports an optional asynchronous onClose callback.

    0.45.0release notes

  • Provides a list-item factory used by children normalization, letting ListNode subclasses supply a custom ListItemNode without monkey-patching the normalizer.

    0.45.0release notes

  • Exposes the Backspace behavior that merges the previous block’s children into the current block, preserving the current block’s type and format.

    0.45.0release notes

  • Rich-text and plain-text registration now removes empty inline elements; the extension is also available for extension-based setups.

    0.45.0release notes

  • ActionsPlugin can disable PagesExtension in HTML and Markdown modes.

    0.45.0release notes

  • Adds an opt-in signal configuration for controlling format escaping on enter, click, arrow, space, and tab triggers; disabled by default.

    0.45.0release notes

  • Extracts text-align and dir from a DOM element and applies them to an ElementNode; ListItemNode import now uses it for alignment.

    0.45.0release notes

Performance 3

Behavior and default changes 13

  • ElementNode now uniformly imports and exports this attribute, allowing subclasses to round-trip indent levels through HTML without overriding importDOM or exportDOM.

    0.45.0release notes

  • ElementNode import and export now support data-lexical-indent.

    0.45.0release notes

  • Child slots can now be expressed for arbitrary DOM containers, and DOM creation, update, export, and slot lookup use the generalized override surface.

    0.45.0release notes

  • Element-shortcut transforms now run on Enter.

    0.45.0release notes

  • Now walks through shadow roots when resolving a node’s reconciled dir attribute, so nested shadow-root elements inherit direction consistently.

    0.45.0release notes

  • Imports the dir attribute.

    0.45.0release notes

  • Clicking after the last block can insert a paragraph.

    0.45.0release notes

  • The onOpenEmbedModalForConfig prop is now optional.

    0.45.0release notes

  • The onClose handler may now return a Promise, allowing asynchronous work before the menu is torn down.

    0.45.0release notes

  • Default Markdown import preserves hard line breaks and handles Unicode whitespace.

    0.45.0release notes

  • Markdown shortcuts now run on Enter and on composition-committed triggers.

    0.45.0release notes

  • $getReconciledDirection now includes the shadow root when determining direction.

    0.45.0release notes

  • May now be null so code blocks without an explicit language round-trip through Markdown without injecting a default language tag.

    0.45.0release notes

Fixes and other changes 20

  • Backspace at the start of a block now preserves the current block.

    0.45.0release notes

  • isBlockDomNode and isInlineDomNode now respect the CSS display style.

    0.45.0release notes

  • Pressing Enter with a block DecoratorNode NodeSelection now inserts a paragraph.

    0.45.0release notes

  • A null Tokenizer.defaultLanguage preserves Markdown fenced-code round trips.

    0.45.0release notes

  • DOM Selection property reads in $updateDOMSelection are deferred.

    0.45.0release notes

  • DOM imports now preserve the dir attribute.

    0.45.0release notes

  • Moving a node between parents now adjusts the current selection to follow the moved node instead of leaving it at the original slot.

    0.45.0release notes

  • Now respects CSS display style when determining whether a DOM node is block-level.

    0.45.0release notes

  • Now respects CSS display style when determining whether a DOM node is inline.

    0.45.0release notes

  • Moving a node between parents now adjusts the current selection to follow the moved node instead of leaving it at the original slot.

    0.45.0release notes

  • Shortcuts typed through IME composition now trigger after composition is committed, rather than only on raw beforeinput.

    0.45.0release notes

  • Prevents crashes on decorator-only elements and restores Shift+Cmd+Arrow selection expansion.

    0.45.0release notes

  • Prevents crashes on decorator-only elements and restores Shift+Cmd+Arrow selection expansion.

    0.45.0release notes

  • Prevents a crash when moving the selection with an arrow key outside a nested table.

    0.45.0release notes

  • Now preserves queued updates and tags through root-element changes.

    0.45.0release notes

  • Now correctly outdents space-indented lines as well as tab-indented lines, respecting the tokenizer’s configured indent width.

    0.45.0release notes

  • Outdenting now works for space-indented code lines.

    0.45.0release notes

  • A null defaultLanguage preserves Markdown fenced-code round trips.

    0.45.0release notes

  • Triple-click selection handling moves to NormalizeTripleClickSelectionExtension.

    0.45.0release notes

  • Lexical detects infinite recursion in update listeners.

    0.45.0release notes

lexical 0.4432 changes

Breaking changes 1

  • $createChildrenArray is now exported from lexical; import it there rather than from @lexical/offset.

    0.44.0release notes

Deprecations 4

  • CodeHighlighterShikiExtension is retained as a deprecated backwards-compatible shim; use CodeShikiExtension.

    0.44.0release notes

  • Using CodeNode without CodeExtension is deprecated; the node is expected to stop working without the extension in a future version.

    0.44.0release notes

  • $createOffsetView is deprecated; use $createChildrenArray from lexical instead.

    0.44.0release notes

  • OffsetView is deprecated because it never worked correctly and has no documentation, tests, or monorepo usage.

    0.44.0release notes

New APIs and options 22

  • AutoLinkExtension accepts an optional punctuation setting to override the default AutoLink boundary characters.

    0.44.0release notes

  • The @lexical/code-prism package now exports CodePrismExtension.

    0.44.0release notes

  • The @lexical/code-shiki package now exports CodeShikiExtension with runtime-toggleable, hot-swappable signal-based configuration.

    0.44.0release notes

  • This priority registers listeners that run most-recently-registered first, ahead of legacy listeners at the same priority.

    0.44.0release notes

  • This priority registers listeners that run most-recently-registered first, ahead of legacy listeners at the same priority.

    0.44.0release notes

  • This priority registers listeners that run most-recently-registered first, ahead of legacy listeners at the same priority.

    0.44.0release notes

  • This priority registers listeners that run most-recently-registered first, ahead of legacy listeners at the same priority.

    0.44.0release notes

  • This priority registers listeners that run most-recently-registered first, ahead of legacy listeners at the same priority.

    0.44.0release notes

  • CreateEditorArgs.dom accepts a partial EditorDOMRenderConfig to override rendering when creating an editor.

    0.44.0release notes

  • $decorateDOM runs after a node is created or updated and its children reconciled, for in-place DOM or attribute tweaks.

    0.44.0release notes

  • domOverride targets node classes, predicates, or the wildcard for DOM rendering overrides; overrides can call $next() to delegate.

    0.44.0release notes

  • The experimental DOMRenderExtension enables composable middleware to override node DOM creation, updating, and export.

    0.44.0release notes

  • EditorDOMRenderConfig parameterizes node rendering and export so they can be overridden through composable middleware.

    0.44.0release notes

  • $generateDOMFromNodes populates a container using the configured render config.

    0.44.0release notes

  • $generateDOMFromRoot populates a container using the configured render config.

    0.44.0release notes

  • $handlePlainTextDrop implements Lexical-aware text drag-and-drop, including cross-editor drags.

    0.44.0release notes

  • $handleRichTextDrop implements Lexical-aware text drag-and-drop, including cross-editor drags and preservation of decorators.

    0.44.0release notes

  • $isLexicalNode is now exported from lexical.

    0.44.0release notes

  • LexicalAutoLinkPlugin accepts an optional punctuation setting to override the default AutoLink boundary characters.

    0.44.0release notes

  • registerAutoLink accepts an optional punctuation setting to override the default AutoLink boundary characters.

    0.44.0release notes

  • Render-context APIs are exposed for reading, updating, and exporting render context values.

    0.44.0release notes

  • SplitAtPointCaretNextOptions gains removeEmptyDestination to control whether an empty destination is replaced entirely.

    0.44.0release notes

Behavior and default changes 4

  • @lexical/extension is now formally stable and no longer marked @experimental.

    0.44.0release notes

  • The NodeState API is now formally stable and no longer marked @experimental.

    0.44.0release notes

  • registerPlainText now wires the shared Lexical-aware drop handler by default.

    0.44.0release notes

  • registerRichText now wires the shared Lexical-aware drop handler by default.

    0.44.0release notes

Fixes and other changes 1

  • The three-Enter code-block escape logic is now handled by a KEY_ENTER_COMMAND listener registered by CodeExtension, fixing blank-line paste escaping code blocks.

    0.44.0release notes

lexical 0.4310 changes

New APIs and options 2

  • Adds CSS classes to collaboration cursor elements, allowing them to be styled.

    0.43.0release notes

  • Adds a module for reading signal values from extension output within React components.

    0.43.0release notes

Behavior and default changes 2

  • Selection style values for properties are now direction-independent.

    0.43.0release notes

  • Infers column header state from position during DOM import.

    0.43.0release notes

Fixes and other changes 6

  • Preserves cursor position when merging adjacent identical links.

    0.43.0release notes

  • Fixes an edge case and provides consistent DecoratorNode behavior inside MarkNode.

    0.43.0release notes

  • Excludes Android WebView from Safari browser detection.

    0.43.0release notes

  • Preserves hard line breaks during import when newlines are preserved.

    0.43.0release notes

  • Nested editors now use asynchronous parent editor delegation when needed, matching pre-0.42.0 legacy behavior.

    0.43.0release notes

  • Fixes merging TextNodes when __state contains a different number of default values.

    0.43.0release notes

lexical 0.4229 changes

Breaking changes 6

  • Markdown handling now enforces CommonMark flanking rules for trailing spaces.

    0.42.0release notes

  • The deprecated ContextMenu was removed; menu rendering was consolidated with the backward-compatible menuRenderFn.

    0.42.0release notes

  • Calling $copyNode now invokes resetOnCopyNodeFrom on the copied node; this affects $copyNode only, not serialization or copy and paste.

    0.42.0release notes

  • At the edge of an ElementNode, deleteWord now behaves like deleteCharacter.

    0.42.0release notes

  • Prism highlighting now lives in this package; migrate Prism highlighting imports from @lexical/code.

    0.42.0release notes

  • Menu rendering was consolidated around this backward-compatible function as deprecated ContextMenu was removed.

    0.42.0release notes

Deprecations 1

  • Prism-related functionality in this package is deprecated; use @lexical/code-prism or @lexical/code-shiki for highlighting.

    0.42.0release notes

New APIs and options 6

  • Inserts a node without splitting containing nodes, including inline elements that can contain the inserted content.

    0.42.0release notes

  • Provides Lexical code functionality without a Prism dependency.

    0.42.0release notes

  • Introduced as part of the extension and playground refactor.

    0.42.0release notes

  • Subclasses can override this method to reset ephemeral state when $copyNode copies a node.

    0.42.0release notes

  • Introduced as part of the extension and playground refactor.

    0.42.0release notes

  • NodeState configurations can mark state for resetting when a node is copied with $copyNode.

    0.42.0release notes

Performance 1

  • Production builds are generated in an ASCII-only format, which may considerably reduce memory usage in some deployment environments.

    0.42.0release notes

Behavior and default changes 8

  • Autolink matching is now enabled when a link is unlinked.

    0.42.0release notes

  • EditableListener callbacks can now return unregister callbacks.

    0.42.0release notes

  • This experimental, incomplete functionality has moved to the playground.

    0.42.0release notes

  • Adjacent LinkNodes with identical attributes are now merged.

    0.42.0release notes

  • Split-like operations now create copies of ListNode and ListItemNode.

    0.42.0release notes

  • Split-like operations now create copies of ListNode and ListItemNode.

    0.42.0release notes

  • RootListener callbacks can now return unregister callbacks.

    0.42.0release notes

  • Markdown import now converts tabs to TabNode.

    0.42.0release notes

Tooling 1

  • Now provides flat configuration and full support for eslint 9 and later.

    0.42.0release notes

Fixes and other changes 6

  • Markdown backslash handling now complies with CommonMark.

    0.42.0release notes

  • Changed from a type alias to an interface.

    0.42.0release notes

  • Inserting consecutive line breaks now preserves selection format.

    0.42.0release notes

  • Now respects CSS scroll-padding when scrolling the editor selection into view.

    0.42.0release notes

  • A single-cell table selection is now prevented after exiting table selection.

    0.42.0release notes

  • Nested table selection handling was improved, including selections crossing into and out of nested tables.

    0.42.0release notes

lexical 0.4126 changes

Breaking changes 2

  • Moving to a different node during composition no longer applies format or style.

    0.41.0release notes

  • The CSS custom property is now read only from the editor root, so CSS or code setting it must target that element.

    0.41.0release notes

Deprecations 1

New APIs and options 3

  • The checklist extension now offers a focus event option.

    0.41.0release notes

  • A new extension applies format to DecoratorTextNode.

    0.41.0release notes

  • Indentable nodes can now be configured.

    0.41.0release notes

Behavior and default changes 8

  • The caret can now move outside of a code block.

    0.41.0release notes

  • DOM selection is now supported in elements with slots.

    0.41.0release notes

  • Pressing Enter after ``` can now create a code block.

    0.41.0release notes

  • Keyboard shortcuts can now be triggered by physical key code on non-ASCII keyboard layouts.

    0.41.0release notes

  • Nested tables can now be fit when pasted.

    0.41.0release notes

  • ParagraphNode importDOM now supports the legacy HTML align attribute.

    0.41.0release notes

  • Inserted tabs now inherit format and style.

    0.41.0release notes

  • HTML import now supports the scope attribute on th tags.

    0.41.0release notes

Fixes and other changes 12

  • AutoLink no longer links URLs inside code blocks without highlighting.

    0.41.0release notes

  • AutoLinkNode is included in AutoLinkExtension node dependencies and no longer creates extra paragraphs.

    0.41.0release notes

  • The anchor no longer moves when inserting the composition start character.

    0.41.0release notes

  • History now records the character entered during composition.

    0.41.0release notes

  • Formatting is maintained when composition text replaces multiple formatted text nodes.

    0.41.0release notes

  • Nested fenced code blocks now parse and export correctly.

    0.41.0release notes

  • Selected text is now properly deleted after IME input on Safari for macOS.

    0.41.0release notes

  • Nested LinkNode creation is prevented, and blocks are moved outside inline LinkNode elements when inserting a paragraph.

    0.41.0release notes

  • The markdown shortcut link transformer is less greedy when recognizing links.

    0.41.0release notes

  • Ordered list numbering is preserved when a list is split by blocks or paragraphs.

    0.41.0release notes

  • Pasting table rows inside a table now preserves background color.

    0.41.0release notes

  • When the selection is collapsed, $toggleLink removes the whole link.

    0.41.0release notes

lexical 0.4016 changes

Breaking changes 3

  • Moved from @lexical/utils to lexical, changing where developers import it from.

    0.40.0release notes

  • Moved from @lexical/utils to lexical, changing where developers import it from.

    0.40.0release notes

  • Moved from @lexical/utils to lexical, changing where developers import it from.

    0.40.0release notes

New APIs and options 1

  • Exposed the onReposition prop on SelectionAlwaysOnDisplay.

    0.40.0release notes

Behavior and default changes 1

Fixes and other changes 11

  • Fixed an infinite transform loop in AutoLinkPlugin.

    0.40.0release notes

  • Fixed the cursor disappearing in Firefox when dragging blocks.

    0.40.0release notes

  • Fixed Ctrl+A so it selects all cells in tables with merged cells.

    0.40.0release notes

  • Fixed a selection issue caused by a list transform on linebreak.

    0.40.0release notes

  • Fixed incorrect format tag placement at link boundaries.

    0.40.0release notes

  • Fixed inconsistent multi-cell selection in 2x2 tables.

    0.40.0release notes

  • Fixed formatting being removed on multi-selection after replace.

    0.40.0release notes

  • Fixed toggling links when they have nested children.

    0.40.0release notes

  • Remote cursors are cleared immediately on collaborator refresh.

    0.40.0release notes

  • Fixed a cache coherency bug in RootNode.getTextContent().

    0.40.0release notes

  • Whitespace-only list items are treated as empty when pressing Enter.

    0.40.0release notes

lexical 0.399 changes

New APIs and options 2

  • Commands are available for beforeinput, input, compositionstart, and compositionend events.

    0.39.0release notes

  • An opt-in configuration for nested tables was added, but it does not fix their behavior.

    0.39.0release notes

Behavior and default changes 2

  • Unchanged non-primitive property and state values are no longer rewritten to Yjs in collab v2.

    0.39.0release notes

  • ElementNode JSON now includes textFormat and textStyle only when needed: for non-root elements without direct TextNode children, preserving formatting choices.

    0.39.0release notes

Fixes and other changes 5

  • Table column widths are now ensured to have a length equal to the number of columns.

    0.39.0release notes

  • The caret iterator can now stop at its last descendant.

    0.39.0release notes

  • The first cell's contents are now included in partial backwards table selections.

    0.39.0release notes

  • Text styles are now applied to empty ElementNodes in a selection, such as empty paragraphs in empty table cells.

    0.39.0release notes

  • The typeahead menu no longer closes during IME composition.

    0.39.0release notes

lexical 0.3818 changes

Breaking changes 1

  • Configuration is flattened: pass options such as defaultTheme directly instead of nesting them under tokenizer.

    0.38.1release notes

New APIs and options 2

  • Added getServerSnapshot for improved React Server Components compatibility.

    0.38.1release notes

  • LinkExtension now implements mergeConfig.

    0.38.1release notes

Behavior and default changes 6

  • Exceptions in clipboard paste handlers are now logged.

    0.38.1release notes

  • List import now supports Joplin checklists.

    0.38.1release notes

  • Command listener priorities were lowered from CRITICAL to HIGH, allowing applications to override them.

    0.38.1release notes

  • Nodes configuration can be deferred to address circular dependency reasons.

    0.38.1release notes

  • Linked text now supports selective removal.

    0.38.1release notes

  • Static transforms from all superclasses are now applied implicitly, so subclasses do not need to call super when adding a transform.

    0.38.1release notes

Fixes and other changes 9

  • Fixes Markdown formatting when a backslash is before or after a closing backtick.

    0.38.2release notes

  • Fixes cursor position updates on awareness updates in collab v1.

    0.38.2release notes

  • The block cursor is updated when the selection changes.

    0.38.1release notes

  • Fixed the implicit checklist marker export regression.

    0.38.1release notes

  • Elements added and removed between snapshots are skipped.

    0.38.1release notes

  • Lexical selection is retained during updates on unfocused editors.

    0.38.1release notes

  • Moving to the start or end of a line in code blocks now respects right-to-left text direction.

    0.38.1release notes

  • Markdown links with empty strings are no longer automatically removed.

    0.38.1release notes

  • Fixed bugs in normalizeMarkdown when using shouldMergeAdjacentLines.

    0.38.1release notes