> For the complete documentation index, see [llms.txt](https://docs.powerpointgeneratorapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powerpointgeneratorapi.com/examples/text-shape/set-text-alignment.md).

# Set text alignment

1. Select the shape by `name` you want to modify. See [here](/knowledge-base/finding-shape-names.md) to find shape names.
2. Specify the text need amending under `text_run`. Text within one textbox can be split into multiple chunks. &#x20;
3. Add font settings for selected text under `text_properties`.
4. Insert `new_line` as boolean before another `text_run`.&#x20;

Before and After

![](https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FPhRIAjzb17QlzfVDJoTB%2Fslides_as_template_text_align.png?alt=media\&token=0af8037b-5d94-4718-bccb-154a71485ce2)![](https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FNzzlu59gLpEzTQ9iPtY8%2F8e4c9e07-1c38-427e-b250-ddbf5e46e474.png?alt=media\&token=82f73e96-ee15-494d-8d63-a2c33f2fb87d)

Template Presentation

{% file src="/files/6PvGN5hesXoIj5EaugSy" %}

JSON Payload

{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "slides_as_template_text_align.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "Title 1",
            "text": [
              {
                "text_run": "Text align: left\n",
                "text_properties": {
                  "text_align": "left"
                }
              },
              {
                "text_run": "Text align: center\n",
                "text_properties": {
                  "text_align": "center"
                }
              },
              {
                "text_run": "Text align: right\n",
                "text_properties": {
                  "text_align": "right"
                }
              },
              {
                "text_run": "Text align: justified\n",
                "text_properties": {
                  "text_align": "justified"
                }
              },
              {
                "text_run": "Text align: distribution\n",
                "text_properties": {
                  "text_align": "dist"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endcode %}
