Skip to main content

@lexical/react/useLexicalFocusManager

Functions

useLexicalFocusManager()

useLexicalFocusManager(editor, toolbarRef, options?): void

Defined in: packages/lexical-react/src/useLexicalFocusManager.ts:25

React wrapper around registerFocusManager from @lexical/a11y.

Alt+F10 inside the editor moves focus to the first focusable in toolbarRef; Escape inside the toolbar returns focus to the editor. The editor's last selection is preserved across the jump.

Hosts using @lexical/extension can wire the same behavior via FocusManagerExtension from @lexical/a11y.

Parameters

editor

LexicalEditor

toolbarRef

RefObject<HTMLElement | null>

options?

FocusManagerOptions = {}

Returns

void

References

FocusManagerOptions

Re-exports FocusManagerOptions