# 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

![](/files/UJjshj1rwk0ykta2377x)![](/files/MgSed6Y9jErdbyRPiaAo)

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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerpointgeneratorapi.com/examples/text-shape/set-text-alignment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
