Énumération des en-têtes de paragraphe standards.
Pour appeler une énumération, vous appelez sa classe parente, son nom et sa propriété. Par exemple,
DocumentApp.ParagraphHeading.NORMAL.
Utilisez l'énumération ParagraphHeading pour configurer le style de titre pour 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);
Propriétés
| Propriété | Type | Description |
|---|---|---|
NORMAL | Enum | Option de titre pour le texte normal. |
HEADING1 | Enum | Option de titre le plus élevé. |
HEADING2 | Enum | Deuxième option de titre. |
HEADING3 | Enum | La troisième option de titre |
HEADING4 | Enum | Quatrième option de titre. |
HEADING5 | Enum | La cinquième option de titre. |
HEADING6 | Enum | L'option de titre le plus bas. |
TITLE | Enum | Option d'en-tête de titre. |
SUBTITLE | Enum | Option du titre du sous-titre. |