Устанавливает максимальное количество строк текста, отображаемых в виджете. Если текст превышает указанное максимальное количество строк, лишнее содержимое скрывается за кнопкой «показать больше». Если текст равен или короче указанного максимального количества строк, кнопка «показать больше» не отображается.
Доступно для приложений Google Chat. В предварительной версии для разработчиков надстроек Google Workspace.
consttextParagraph=CardService.newTextParagraph().setText('This is a text paragraph widget. Multiple lines are allowed if needed.',).setMaxLines(1);
Параметры
Имя
Тип
Описание
max Lines
Integer
Максимальное количество отображаемых строк текста.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-01-30 UTC."],[[["The `TextParagraph` widget displays text with basic HTML formatting support."],["It is usable in Google Workspace Add-ons and Google Chat apps."],["Developers can set the displayed text using the `setText()` method and can chain additional methods for further customization."],["The `setText()` method requires a string argument representing the desired text content."]]],["The `TextParagraph` widget displays text with basic HTML formatting in Google Workspace add-ons and Google Chat apps. Key actions include `setText(text)` to define the displayed text and `setMaxLines(maxLines)` to limit the visible lines; exceeding this limit adds a \"show more\" button. `setMaxLines` is in developer preview for Google Workspace and available for Google Chat, whereas `setText` is fully available. Both methods return the `TextParagraph` object to enable method chaining.\n"]]