A contextual menu that appears when text is selected
TooltipMenuSpell
component creates a contextual menu that automatically appears when text is selected, perfect for text editing, AI-powered transformations, and quick actions on selected content. It can also spawn floating input fields for more complex interactions.
Prop | Type | Required | Default | Description |
---|---|---|---|---|
spellId | string | Yes | - | Unique identifier for this spell instance |
items | ExtendedTooltipMenuItem[] | Yes | - | Menu items to display |
activationConditions | ActivationConditions | No | Text selection | Custom activation conditions |
stream | boolean | No | true | Whether to use streaming for floating input |
spawnsInput: true
, it opens a floating input field:
spawnsInput: true
SelectionEvent.TEXT_SELECT
user-select: none
on textspawnsInput
is set correctlysetOverrideInputContent
is availablepreventDefaultEvents
setting