Back to API Reference
Struct
TextCommandContext
sealed
The field a TextCommand is asked about or run against, in its state at that moment.
public UniTextSelectable Selectable{ get }Selection component of the field; its UniTextSelectable.Selection is what a command acts on.
public UniTextEditable Editable{ get }Enabled editing layer of the field, or null for read-only selectable text.
[ctor]public TextCommandContext(UniTextSelectable selectable)Captures the field of selectable, so a command can also run outside a menu — from a toolbar button or a shortcut.
public CapturedSelection CaptureSelection()Captures the selection for a replacement that arrives later, after asynchronous work.
