כדי לקרוא למאפיין enum, צריך לקרוא לכיתה ההורה, לשם ולנכס שלו. לדוגמה,
DocumentApp.HorizontalAlignment.LEFT.
אפשר להשתמש בספירה HorizontalAlignment כדי לשנות את היישור של תוכן Paragraph.
constbody=DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();// Insert a paragraph and a table at the start of the tab.constpar1=body.insertParagraph(0,'Center');consttable=body.insertTable(1,[['Left','Right']]);constpar2=table.getCell(0,0).getChild(0).asParagraph();constpar3=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-22 (שעון 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."]]],[]]