An enumeration of the standard paragraph headings.
Use the ParagraphHeading enumeration to configure
the heading style for ParagraphElement.
var doc = DocumentApp.getActiveDocument();
// Append a paragraph, with heading 1.
var par1 = doc.appendParagraph("Title");
par1.setHeading(DocumentApp.ParagraphHeading.HEADING1);
// Append a paragraph, with heading 2.
var par2 = doc.appendParagraph("SubTitle");
par2.setHeading(DocumentApp.ParagraphHeading.HEADING2);
// Append a paragraph, with normal heading.
var par3 = doc.appendParagraph("Text");
par3.setHeading(DocumentApp.ParagraphHeading.NORMAL);
Properties
| Property | Type | Description |
|---|---|---|
NORMAL | Enum | The heading option for normal text. |
HEADING1 | Enum | The highest heading option. |
HEADING2 | Enum | The second heading option. |
HEADING3 | Enum | The third heading option |
HEADING4 | Enum | The fourth heading option. |
HEADING5 | Enum | The fifth heading option. |
HEADING6 | Enum | The lowest heading option. |