@lexical/react/useLexicalFocusManagerRef
Functions
useLexicalFocusManagerRef()
useLexicalFocusManagerRef(
options?):RefCallback<HTMLElement>
Defined in: packages/lexical-react/src/useLexicalFocusManagerRef.ts:31
Returns a RefCallback that registers the attached DOM element as a
focus-managed toolbar with FocusManagerExtension, and releases
it when the element detaches. Attach it to a toolbar element via ref=:
const toolbarRef = useLexicalFocusManagerRef();
return <div ref={toolbarRef} role="toolbar">…</div>;
Multiple elements can use this hook simultaneously — each gets its own independent Alt+F10 / Escape handler.
Requires FocusManagerExtension in the editor's extension tree.
Parameters
options?
FocusManagerOptions = {}
Returns
RefCallback<HTMLElement>
References
FocusManagerOptions
Re-exports FocusManagerOptions