Đặt số dòng văn bản tối đa hiển thị trong tiện ích. Nếu văn bản vượt quá số dòng tối đa đã chỉ định, thì nội dung thừa sẽ được ẩn sau nút "hiển thị thêm". Nếu văn bản bằng hoặc ngắn hơn số dòng tối đa được chỉ định, thì nút "hiển thị thêm" sẽ không hiển thị.
Có sẵn cho các ứng dụng Google Chat. Trong bản dùng thử dành cho nhà phát triển cho tiện ích bổ sung của Google Workspace.
consttextParagraph=CardService.newTextParagraph().setText('This is a text paragraph widget. Multiple lines are allowed if needed.',).setMaxLines(1);
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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"]]