Class TextFormatChip

TextFormatChip

A clickable chip in the text format.

Only available for Google Workspace add-ons that extend Google Workspace Studio.

Sample usage:

constchip=AddOnsResponseService.newChip()
.setTextFormatIcon(AddOnsResponseService.newTextFormatIcon()
.setIconUrl("https://www.google.com/icon.png"))
.setLabel("test_label")
.setUrl("https://www.google.com/chip.png");

}

Methods

MethodReturn typeBrief description
setLabel(label) TextFormatChip Sets the text displayed in the chip.
setTextFormatIcon(icon) TextFormatChip Sets the icon displayed in the chip.
setUrl(url) TextFormatChip Sets the URL to navigate to when the chip is clicked.

Detailed documentation

setLabel(label)

Sets the text displayed in the chip.

Parameters

NameTypeDescription
labelStringThe text label of the chip.

Return

TextFormatChip — This chip object, for chaining.


setTextFormatIcon(icon)

Sets the icon displayed in the chip.

Parameters

NameTypeDescription
iconTextFormatIcon The TextFormatIcon to set in the chip.

Return

TextFormatChip — This chip object, for chaining.


setUrl(url)

Sets the URL to navigate to when the chip is clicked.

Parameters

NameTypeDescription
urlStringThe destination URL to the chip.

Return

TextFormatChip — This chip object, for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年12月03日 UTC.