photoshop_update_text_content
Replace the text content of an active text layer while preserving font, color, and alignment. Use when you need to change the wording of existing text.
Instructions
Replace the string contents of the active text layer. Font, color, and alignment stay as they are.
Use when: the wording of an existing text layer should change. Do NOT use when: no text layer exists yet — use photoshop_create_text_layer. Do NOT use when: only style should change — use photoshop_set_text_style, photoshop_set_text_font, photoshop_set_text_color, or photoshop_set_text_alignment.
Returns: confirmation with the new text. Preconditions: active document and an active text layer. Side effects: replaces the characters. The same string is idempotent. Reversible with photoshop_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | New text content | |
| document_id | Yes | Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call. |