Live: set selected text
live_set_selected_textReplace the text content of the currently selected text object in an active Inkscape document. Requires explicit approval to execute.
Instructions
Replace the selected text object's content in the running document.
When to use: changing the selected text object's words live. To restyle the selection use
live_apply_to_selection; for the headless equivalent use replace_text.
Key params: text is length-bounded and control-character-rejected (the same guard as the
headless replace_text); it is stored as a text node, so no markup injection is possible.
Editing a running user session is HIGH risk: REQUIRES an explicit approval_token (refused
without one).
Return shape: LiveEditResult — a Live Operation Record with before/after canvas renders,
syncable to a snapshot.
Example: live_set_selected_text("Hello", approval_token="ok")
Risk class: high (approval-gated).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| approval_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| summary | No | ||
| transport | No | ||
| affected_ids | No | ||
| operation_id | Yes | ||
| preview_after | No | ||
| undo_friendly | No | ||
| preview_before | No |