FocusScopes extension, included by default in StarterKit, keeps the
editor’s focus and blur behavior in sync across registered surfaces. Wrap each
custom portaled surface that should still count as being inside the editor UI
with EditorFocusScope.
EditorFocusScopeProvider
EditorFocusScopeProvider is deprecated. Focus tracking moved to the
FocusScopes extension, which is included by default in StarterKit, but the
provider still installs the same tracking plugin for editors that do not use
StarterKit.
Example
EditorFocusScope for each portaled surface that should still count as
being inside the editor UI.
Props
Rendered unchanged.
Deprecated. Used only by the provider’s fallback plugin. Prefer configuring
FocusScopes in StarterKit instead.EditorFocusScope
UseEditorFocusScope around portaled UI like Radix Select.Content,
Popover.Content, or dialog content so moving focus into that portal is still
treated as staying inside the editor UI.
EditorFocusScope registers with the editor’s FocusScopes extension. If the
extension is not present, it renders its children unchanged.
Example
StarterKit, add the
FocusScopes extension and then use EditorFocusScope for each portaled
surface.
Props
The element or subtree to register as an additional editor focus scope. Wrap
the portaled container that receives focus.