ParagraphStyle

The styles of text that apply to entire paragraphs.

Read methods in this class return `null` if the corresponding `https://developers.google.com/apps-script/reference/slides/text-range` spans
multiple paragraphs, and those paragraphs have different values for the read method being called.
To avoid this, query for paragraph styles using the `https://developers.google.com/apps-script/reference/slides/text-range` returned by the `https://developers.google.com/apps-script/reference/slides/paragraph#getRange()` method.

If you use methods that edit how text fits within a shape, any autofit settings applied to the
paragraph styles are deactivated.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getIndentEnd()` | `Number|null` | Returns the text end indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getIndentFirstLine()` | `Number|null` | Returns the indentation for the first line of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getIndentStart()` | `Number|null` | Returns the text start indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getLineSpacing()` | `Number|null` | Returns the line spacing, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getParagraphAlignment()` | `https://developers.google.com/apps-script/reference/slides/paragraph-alignment|null` | Returns the `https://developers.google.com/apps-script/reference/slides/paragraph-alignment` of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getSpaceAbove()` | `Number|null` | Returns the extra space above paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getSpaceBelow()` | `Number|null` | Returns the extra space below paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getSpacingMode()` | `https://developers.google.com/apps-script/reference/slides/spacing-mode|null` | Returns the `https://developers.google.com/apps-script/reference/slides/spacing-mode` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#getTextDirection()` | `https://developers.google.com/apps-script/reference/slides/text-direction|null` | Returns the `https://developers.google.com/apps-script/reference/slides/text-direction` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`, or `null` if there are multiple paragraph styles on the given text. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setIndentEnd(Number)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the text end indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setIndentFirstLine(Number)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the indentation for the first line of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setIndentStart(Number)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the text start indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setLineSpacing(Number)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the line spacing. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setParagraphAlignment(ParagraphAlignment)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the `https://developers.google.com/apps-script/reference/slides/paragraph-alignment` of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setSpaceAbove(Number)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the extra space above paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setSpaceBelow(Number)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the extra space below paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setSpacingMode(SpacingMode)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the `https://developers.google.com/apps-script/reference/slides/spacing-mode` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`. |
| `https://developers.google.com/apps-script/reference/slides/paragraph-style#setTextDirection(TextDirection)` | `https://developers.google.com/apps-script/reference/slides/paragraph-style#` | Sets the `https://developers.google.com/apps-script/reference/slides/text-direction` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`. |

## Detailed documentation

### `getIndentEnd()`

Returns the text end indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if there are multiple paragraph styles on the given text.

The side that corresponds to the end of the text is based on the current text direction.

#### Return


`Number|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getIndentFirstLine()`

Returns the indentation for the first line of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or
`null` if there are multiple paragraph styles on the given text.

#### Return


`Number|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getIndentStart()`

Returns the text start indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if there are multiple paragraph styles on the given text.

The side that corresponds to the start of the text is based on the current text direction.

#### Return


`Number|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getLineSpacing()`

Returns the line spacing, or `null` if there are multiple paragraph styles on the given
text.

This is a value that corresponds to the space between lines, as a percentage of normal.
Normal is represented as 100.0.

#### Return


`Number|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getParagraphAlignment()`

Returns the `https://developers.google.com/apps-script/reference/slides/paragraph-alignment` of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`, or `null`
if there are multiple paragraph styles on the given text.

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-alignment|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getSpaceAbove()`

Returns the extra space above paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if
there are multiple paragraph styles on the given text.

#### Return


`Number|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getSpaceBelow()`

Returns the extra space below paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points, or `null` if
there are multiple paragraph styles on the given text.

#### Return


`Number|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getSpacingMode()`

Returns the `https://developers.google.com/apps-script/reference/slides/spacing-mode` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`, or `null` if
there are multiple paragraph styles on the given text.

#### Return


`https://developers.google.com/apps-script/reference/slides/spacing-mode|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getTextDirection()`

Returns the `https://developers.google.com/apps-script/reference/slides/text-direction` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`, or `null` if
there are multiple paragraph styles on the given text.

#### Return


`https://developers.google.com/apps-script/reference/slides/text-direction|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setIndentEnd(indent)`

Sets the text end indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `indent` | `Number` | The indentation to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setIndentFirstLine(indent)`

Sets the indentation for the first line of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `indent` | `Number` | The indentation to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setIndentStart(indent)`

Sets the text start indentation for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `indent` | `Number` | The indentation to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setLineSpacing(spacing)`

Sets the line spacing.

This is a value that corresponds to the space between lines, as a percentage of normal.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `spacing` | `Number` | The spacing to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setParagraphAlignment(alignment)`

Sets the `https://developers.google.com/apps-script/reference/slides/paragraph-alignment` of paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `alignment` | `https://developers.google.com/apps-script/reference/slides/paragraph-alignment` | The alignment to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSpaceAbove(space)`

Sets the extra space above paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `space` | `Number` | The space above to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSpaceBelow(space)`

Sets the extra space below paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range` in points.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `space` | `Number` | The space below to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSpacingMode(mode)`

Sets the `https://developers.google.com/apps-script/reference/slides/spacing-mode` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `mode` | `https://developers.google.com/apps-script/reference/slides/spacing-mode` | The spacing mode to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setTextDirection(direction)`

Sets the `https://developers.google.com/apps-script/reference/slides/text-direction` for paragraphs in the `https://developers.google.com/apps-script/reference/slides/text-range`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `direction` | `https://developers.google.com/apps-script/reference/slides/text-direction` | The text direction to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/paragraph-style#` --- This `https://developers.google.com/apps-script/reference/slides/paragraph-style#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`