0.31.0 (latest) 0.30.0 0.29.0 0.28.0 0.27.0 0.23.0 0.20.0 0.19.0 0.18.0 0.17.1 0.16.1 0.15.0 0.14.0 0.13.1 0.12.1 0.11.2 0.10.0 0.9.0 0.8.1 0.7.2 0.6.1 0.5.0 0.4.0 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Google Apps Chat V1 Client class TextParagraph.

A paragraph of text that supports formatting. For an example in
Google Chat apps, see [Add a paragraph of formatted
text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text).

For more information
about formatting text, see
[Formatting text in Google Chat
apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
and
[Formatting
text in Google Workspace
add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
[Google Workspace add-ons and
Chat apps](https://developers.google.com/workspace/extend):

Generated from protobuf message `google.apps.card.v1.TextParagraph`

## Namespace

Google \\ Apps \\ Card \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ text` | `string` The text that's shown in the widget. |
| `↳ max_lines` | `int` The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored. |
| `↳ text_syntax` | `int` The syntax of the text. If not set, the text is rendered as HTML. [Google Chat apps](https://developers.google.com/workspace/chat): |

### getText

The text that's shown in the widget.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setText

The text that's shown in the widget.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMaxLines

The maximum number of lines of text that are displayed in the widget. If
the text exceeds the specified maximum number of lines, the excess
content is concealed behind a **show more** button. If the text is equal or
shorter than the specified maximum number of lines, a **show more** button
isn't displayed.

The default value is 0, in which case
all context is displayed. Negative values are ignored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setMaxLines

The maximum number of lines of text that are displayed in the widget. If
the text exceeds the specified maximum number of lines, the excess
content is concealed behind a **show more** button. If the text is equal or
shorter than the specified maximum number of lines, a **show more** button
isn't displayed.

The default value is 0, in which case
all context is displayed. Negative values are ignored.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTextSyntax

The syntax of the text. If not set, the text is rendered as HTML.

[Google Chat apps](https://developers.google.com/workspace/chat):

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TextSyntax](https://docs.cloud.google.com/php/docs/reference/apps-chat/latest/Card.V1.TextParagraph.TextSyntax.md.txt). |

### setTextSyntax

The syntax of the text. If not set, the text is rendered as HTML.

[Google Chat apps](https://developers.google.com/workspace/chat):

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TextSyntax](https://docs.cloud.google.com/php/docs/reference/apps-chat/latest/Card.V1.TextParagraph.TextSyntax.md.txt). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |