photoshop_set_text_alignment
Set justification for an entire active Photoshop text layer, such as left, center, right, or fully justified, so all text shares one alignment.
Instructions
Set justification on the whole active text layer (LEFT through FULLYJUSTIFIED).
Use when: the entire text layer should share one alignment.
Do NOT use when: creating the layer — pass alignment on photoshop_create_text_layer.
Do NOT use when: only a character range should change, or font, color, and tracking should change too — use photoshop_set_text_ranges or photoshop_set_text_style.
Returns: confirmation of the alignment. Preconditions: active document and an active text layer. Side effects: updates TextItem.justification. The same alignment is idempotent. Reversible with photoshop_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alignment | Yes | Text alignment | |
| 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. |