A text format element, which can be a Text, Styled, Hyperlink, or List.
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 |
|---|---|---|
set | Text | Sets the text format element as a Hyperlink. |
set | Text | Sets the text format element as a List. |
set | Text | Sets the text format element as a Styled. |
set | Text | Sets the text format element as a text string. |
set | 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
Text — This text format element object.
setListContainer(listContainer)
Sets the text format element as a List.
Parameters
| Name | Type | Description |
|---|---|---|
list | List | The List of the text format element. |
Return
Text — This text format element object.
setStyledText(styledText)
Sets the text format element as a Styled.
Parameters
| Name | Type | Description |
|---|---|---|
styled | Styled | The Styled of the text format element. |
Return
Text — 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
Text — This text format element object.
setTextFormatChip(chip)
Sets the text format element as a Text.
Parameters
| Name | Type | Description |
|---|---|---|
chip | Text | The Text of the text format element. |
Return
Text — This text format element object.