Class ListContainer

ListContainer

Container for list items, where each list item can contain multiple TextFormatElement. *

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

const listContainer = AddOnsResponseService.newListContainer()
      .setListType(AddOnsResponseService.ListType.UNORDERED)
      .addListItem(
        AddOnsResponseService.newListItem()
          .addTextFormatElement(
            AddOnsResponseService.newTextFormatElement()
              .setStyledText(sampleStyledText)
          ));

Methods

MethodReturn typeBrief description
addListItem(listItem)ListContainerAdds a list item to the list container.
setListNestLevel(listLevel)ListContainerSets the level of the list, starts from 0 for the top level, and increases by 1 for each nested list.
setListType(listType)ListContainerSets the type of the list to be ordered or unordered.

Detailed documentation

addListItem(listItem)

Adds a list item to the list container.

Parameters

NameTypeDescription
listItemListItemThe ListItem to be added to the list container.

Return

ListContainer — This list container object, for chaining.


setListNestLevel(listLevel)

Sets the level of the list, starts from 0 for the top level, and increases by 1 for each nested list.

Parameters

NameTypeDescription
listLevelIntegerThe number of nest levels of the list.

Return

ListContainer — This list container object, for chaining.


setListType(listType)

Sets the type of the list to be ordered or unordered.

Parameters

NameTypeDescription
listTypeListTypeThe ListType of the list.

Return

ListContainer — This list container object, for chaining.