Google Apps Chat V1 Client - Class TextParagraph (0.15.0)

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.

For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace add-ons. Google Workspace add-ons and Chat apps:

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:

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:

Returns
Type Description
int Enum of type TextSyntax.

setTextSyntax

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

Google Chat apps:

Parameter
Name Description
var int

Enum of type TextSyntax.

Returns
Type Description
$this