Class TextFormatChip

文字格式方塊

文字格式的可點選動態磚。

僅適用於擴充 Google Workspace Studio 的 Google Workspace 外掛程式。

用法範例:

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

}

方法

方法傳回類型簡短說明
setLabel(label)TextFormatChip設定要在方塊中顯示的文字。
setTextFormatIcon(icon)TextFormatChip設定要在方塊中顯示的圖示。
setUrl(url)TextFormatChip設定點按智慧型方塊時前往的網址。

內容詳盡的說明文件

setLabel(label)

設定要在方塊中顯示的文字。

參數

名稱類型說明
labelString動態磚的文字標籤。

回攻員

TextFormatChip:這個晶片物件,用於鏈結。


setTextFormatIcon(icon)

設定要在方塊中顯示的圖示。

參數

名稱類型說明
iconTextFormatIcon要在晶片中設定的 TextFormatIcon

回攻員

TextFormatChip:這個晶片物件,用於鏈結。


setUrl(url)

設定使用者點按智慧型方塊時前往的網址。

參數

名稱類型說明
urlString方塊的到達網頁網址。

回攻員

TextFormatChip:這個晶片物件,用於鏈結。