Set paragraph alignment in Google Doc
set_alignmentAligns every paragraph overlapping a given index range to start, center, end, or justified using a document ID and start/end indexes, without altering text or indexes.
Instructions
Set the horizontal alignment of every paragraph that overlaps the index range [startIndex, endIndex): START (left in left-to-right text), CENTER, END (right in left-to-right text) or JUSTIFIED. Whole paragraphs are aligned even if the range covers only part of one. Get paragraph indexes from get_document’s structure outline or find_text. Does not change text or indexes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endIndex | Yes | End of the range (exclusive); must be greater than startIndex. | |
| alignment | Yes | Paragraph alignment. | |
| documentId | Yes | The Google Docs document ID (the part between /d/ and /edit in the document URL). A full Google Docs URL is also accepted. | |
| startIndex | Yes | Start of the range (inclusive). Get exact indexes from get_document or find_text. |