A text format element, which can be a TextFormatChip
, StyledText
, Hyperlink
, or ListContainer
.
Only available for Google Workspace add-ons that extend Google Workspace Studio.
Sample usage:
const sampleChip = AddOnsResponseService . newTextFormatChip () . setLabel ( "Label!" ); const textFormatElement = AddOnsResponseService . newTextFormatElement () . setTextFormatChip ( sampleChip );
Methods
| Method | Return type | Brief description |
|---|---|---|
Text
|
Sets the text format element as a Hyperlink
. |
|
Text
|
Sets the text format element as a List
. |
|
Text
|
Sets the text format element as a Styled
. |
|
Text
|
Sets the text format element as a text string. | |
Text
|
Sets the text format element as a Text
. |
Detailed documentation
setHyperlink(hyperlink)
Sets the text format element as a Hyperlink
.
Parameters
| Name | Type | Description |
|---|---|---|
hyperlink
|
Hyperlink
|
The Hyperlink
of the text format element. |
Return
TextFormatElement
— This text format element object.
setListContainer(listContainer)
Sets the text format element as a ListContainer
.
Parameters
| Name | Type | Description |
|---|---|---|
list
|
List
|
The List
of the text format element. |
Return
TextFormatElement
— This text format element object.
setStyledText(styledText)
Sets the text format element as a StyledText
.
Parameters
| Name | Type | Description |
|---|---|---|
styled
|
Styled
|
The Styled
of the text format element. |
Return
TextFormatElement
— This text format element object.
setText(text)
Sets the text format element as a text string.
Parameters
| Name | Type | Description |
|---|---|---|
text
|
String
|
The text of the text format element. |
Return
TextFormatElement
— This text format element object.
setTextFormatChip(chip)
Sets the text format element as a TextFormatChip
.
Parameters
| Name | Type | Description |
|---|---|---|
chip
|
Text
|
The Text
of the text format element. |
Return
TextFormatElement
— This text format element object.

