Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
HorizontalAlignment
Enumerasi jenis perataan horizontal yang didukung.
Untuk memanggil enum, Anda memanggil class, nama, dan properti induknya. Misalnya,
DocumentApp.HorizontalAlignment.LEFT.
Gunakan enumerasi HorizontalAlignment untuk memanipulasi penyelarasan konten Paragraph.
var body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();
// Insert a paragraph and a table at the start of the tab.
var par1 = body.insertParagraph(0, "Center");
var table = body.insertTable(1, [['Left', 'Right']]);
var par2 = table.getCell(0, 0).getChild(0).asParagraph();
var 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);
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-09-12 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."]]],[]]