Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
ParagraphHeading
Enumerasi judul paragraf standar.
Untuk memanggil enum, Anda memanggil class, nama, dan properti induknya. Misalnya,
DocumentApp.ParagraphHeading.NORMAL.
Gunakan enumerasi ParagraphHeading guna mengonfigurasi gaya arah untuk ParagraphElement.
var body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();
// Append a paragraph, with heading 1.
var par1 = body.appendParagraph("Title");
par1.setHeading(DocumentApp.ParagraphHeading.HEADING1);
// Append a paragraph, with heading 2.
var par2 = body.appendParagraph("SubTitle");
par2.setHeading(DocumentApp.ParagraphHeading.HEADING2);
// Append a paragraph, with normal heading.
var par3 = body.appendParagraph("Text");
par3.setHeading(DocumentApp.ParagraphHeading.NORMAL);
[[["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-13 UTC."],[[["`ParagraphHeading` enumeration is used to set heading styles for paragraphs in Google Docs."],["You can use properties like `NORMAL`, `HEADING1` to `HEADING6`, `TITLE`, and `SUBTITLE` to define different heading levels."],["The provided code snippet demonstrates how to append paragraphs with different heading styles using `setHeading()` method."],["The table lists all available `ParagraphHeading` properties, their types, and descriptions."]]],[]]