Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
JudulParagraf
Enumerasi judul paragraf standar.
Untuk memanggil enum, Anda memanggil class induk, nama, dan propertinya. Misalnya,
DocumentApp.ParagraphHeading.NORMAL.
Gunakan enumerasi ParagraphHeading untuk mengonfigurasi gaya judul untuk ParagraphElement.
const body =
DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();
// Append a paragraph, with heading 1.
const par1 = body.appendParagraph('Title');
par1.setHeading(DocumentApp.ParagraphHeading.HEADING1);
// Append a paragraph, with heading 2.
const par2 = body.appendParagraph('SubTitle');
par2.setHeading(DocumentApp.ParagraphHeading.HEADING2);
// Append a paragraph, with normal heading.
const 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-12-02 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."]]],[]]