enum을 호출하려면 상위 클래스, 이름, 속성을 호출합니다. 예를 들면
DocumentApp.HorizontalAlignment.LEFT입니다.
HorizontalAlignment 열거형을 사용하여 Paragraph 콘텐츠의 정렬을 조작합니다.
const body =
DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();
// Insert a paragraph and a table at the start of the tab.
const par1 = body.insertParagraph(0, 'Center');
const table = body.insertTable(1, [['Left', 'Right']]);
const par2 = table.getCell(0, 0).getChild(0).asParagraph();
const par3 = table.getCell(0, 0).getChild(0).asParagraph();
// Center align the first paragraph.
par1.setAlignment(DocumentApp.HorizontalAlignment.CENTER);
// Left align the first cell.
par2.setAlignment(DocumentApp.HorizontalAlignment.LEFT);
// Right align the second cell.
par3.setAlignment(DocumentApp.HorizontalAlignment.RIGHT);
[[["이해하기 쉬움","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"]],["최종 업데이트: 2024-12-03(UTC)"],[[["`HorizontalAlignment` is used to set the horizontal alignment of paragraph content within Google Docs."],["It provides options for left, center, right, and justify alignment through its properties (`LEFT`, `CENTER`, `RIGHT`, `JUSTIFY`)."],["You can access these alignment options using the syntax `DocumentApp.HorizontalAlignment.ALIGNMENT_TYPE`, where `ALIGNMENT_TYPE` is one of the properties mentioned above."]]],[]]