Skip to main content

Included Extensions

@lexical/a11y

Framework-agnostic accessibility extensions. See Keyboard Accessibility for the full contract and the matching @lexical/react adapters.

  • AriaLiveRegionExtension - Owns a visually hidden aria-live region and exposes a stable announce sink (WAI-ARIA status messages, WCAG 4.1.3)
  • EditorModeAnnounceExtension - Announces editable / read-only transitions through the live region
  • FocusManagerExtension - Editor ↔ toolbar focus jump (Alt+F10 to the toolbar, Escape back to the editor), reference-counted per toolbar
  • FocusTrapExtension - Traps Tab / Shift+Tab focus inside one or more containers (modal dialogs), reference-counted per container
  • HistoryAnnounceExtension - Announces undo / redo through the live region
  • RovingTabIndexExtension - WAI-ARIA roving-tabindex pattern for toolbars / groups, reference-counted per container

@lexical/clipboard

@lexical/code

@lexical/code-prism

@lexical/code-shiki

@lexical/dragon

  • DragonExtension - Dragon (speech to text) support, included by default with RichTextExtension and PlainTextExtension

@lexical/extension

  • AutoFocusExtension - Focus the editor when it is created (e.g. on page load)
  • ClearEditorExtension - Implementation for the CLEAR_EDITOR_COMMAND
  • ClickAfterLastBlockExtension - Inserts a paragraph when clicking below a last block that can not accommodate the click (e.g. a DecoratorNode or TableNode)
  • DecoratorTextExtension - DecoratorTextNode support, sets the format and CSS classes for the DOM container
  • EditorStateExtension - Provide EditorState as a signal (alternative to registerUpdateListener)
  • HMRExtension - Preserves editor state, selection, editability and undo/redo history across Hot Module Replacement (HMR) cycles
  • HorizontalRuleExtension - HorizontalRuleNode (<hr> tag)
  • IMEExtension - Centralizes IME composition state as signals
  • InitialStateExtension - Sets the initial state of the editor (always included)
  • KeyboardShortcutsExtension - Dispatches a table of keyboard shortcuts from a single compiled KEY_DOWN_COMMAND listener; the table is merged across the extension graph by name (experimental)
  • NestedEditorExtension - Configures an editor as a nested editor of a parent editor (theme inheritance, optionally editable state)
  • NodeSelectionExtension - Tracks selection, typically for DecoratorNodes
  • NodeSelectionDataSelectedExtension - Mirrors a node's NodeSelection membership onto its host DOM as a data-selected attribute so CSS can outline selected ElementNode hosts; configured per node type (experimental)
  • NodeStructureExtension - Enforces the node structure classes declare in $config() (children, mergeAdjacent): joins plain paragraphs into the block that holds them as lines, lifts other blocks out of nodes that hold inline content, wraps stray content, merges equal adjacent siblings; see Node structure (experimental)
  • NormalizeInlineElementsExtension - Removes empty inline elements, included by default with RichTextExtension and PlainTextExtension
  • NormalizeTripleClickSelectionExtension - Corrects over-selection after triple click events, included by default with RichTextExtension and PlainTextExtension
  • PreventSelectAllExtension - Prevents select all (Ctrl/Cmd+A) inside input/textarea elements from selecting the editor content, included by default with SelectBlockExtension
  • RootElementExtension - Exposes the editor's root element as a reactive Signal<HTMLElement | null>
  • SelectBlockExtension - Select all (Ctrl/Cmd+A) selects the nearest block element first, pressing it again selects the whole document
  • SelectionAlwaysOnDisplayExtension - Highlights selected content even when the editor is not focused
  • TabIndentationExtension - Changes Tab key to insert tabs and indent instead of natively focusing the next field
  • WatchEditableExtension - Exposes the editor's editable state as a reactive Signal<boolean>

@lexical/hashtag

@lexical/history

@lexical/html

  • CoreImportExtension - DOM import rules for the core nodes, included implicitly by node-providing extensions (experimental)
  • DOMImportExtension - Extension-based replacement for importDOM/DOMConversion, rules are compiled into a dispatcher at editor build time (experimental)
  • DOMRenderExtension - Overrides the DOM render and export behavior for an editor (experimental)

@lexical/link

@lexical/list

@lexical/mark

@lexical/mdast

Experimental micromark/mdast-based Markdown support (every extension in this package is experimental). See Markdown with @lexical/mdast for the full story.

@lexical/overflow

@lexical/plain-text

  • PlainTextExtension - Plain text editor, the return key creates a LineBreakNode by default (one ParagraphNode per document)

@lexical/react

@lexical/rich-text

  • RichTextExtension - Rich Text editor (QuoteNode, HeadingNode), the return key creates a ParagraphNode by default (multiple ParagraphNode per document). Includes configurable escapeFormatTriggers to escape text formatting (e.g. code) at text node boundaries, and shouldHandlePasteAsFiles to control whether files win over incidental text/HTML clipboard entries on paste

@lexical/table

@lexical/tailwind