Interface: BubbleMenu
Controller returned by createBubbleMenu().
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
reference | readonly | VirtualReference | Where the selection is on screen; pass it to your positioning code. |
Methods
dismiss()
ts
dismiss(): void;Hide until the selection changes; focus goes back to the editor.
Returns
void
focusFirst()
ts
focusFirst(): void;Move focus to the first control in the bubble (what the focus shortcut does).
Returns
void
getBubbleProps()
ts
getBubbleProps(): ElementProps;Props for the bubble element: id and data-state (open or closed). Escape dismisses it, and mousedown outside form fields is prevented to keep the selection.
Returns
getState()
ts
getState(): BubbleMenuState;The current state; the same object until something changes.
Returns
subscribe()
ts
subscribe(listener): () => void;Call listener on every state change; returns the unsubscribe function.
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
() => void