Class TextParagraph
텍스트단락
텍스트를 표시하고 기본 HTML 형식을 지원하는 위젯입니다.
Google Workspace 부가기능 및 Google Chat 앱에서 사용할 수 있습니다.
const textParagraph = CardService.newTextParagraph().setText(
'This is a text paragraph widget. Multiple lines are allowed if needed.',
);
자세한 문서
setMaxLines(maxLines)
위젯에 표시되는 텍스트 줄의 최대 개수를 설정합니다. 텍스트가 지정된 최대 줄 수를 초과하면 초과 콘텐츠가 '더보기' 버튼 뒤에 숨겨집니다. 텍스트가 지정된 최대 줄 수와 같거나 짧으면 '더보기' 버튼이 표시되지 않습니다.
Google Chat 앱에서 사용할 수 있습니다. Google Workspace 부가기능 개발자 프리뷰
const textParagraph =
CardService.newTextParagraph()
.setText(
'This is a text paragraph widget. Multiple lines are allowed if needed.',
)
.setMaxLines(1);
매개변수
이름 | 유형 | 설명 |
maxLines | Integer | 표시되는 최대 텍스트 줄 수입니다. |
리턴
TextParagraph
: 연결을 위한 객체입니다.
setText(text)
단락의 텍스트를 설정합니다. 필수 항목입니다.
매개변수
이름 | 유형 | 설명 |
text | String | 표시할 텍스트입니다. |
리턴
TextParagraph
: 연결을 위한 객체입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-01-30(UTC)
[null,null,["최종 업데이트: 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"]]