Wenn Sie ein Enum aufrufen möchten, rufen Sie die übergeordnete Klasse, den Namen und die Eigenschaft auf. Beispiel:
DocumentApp.ParagraphHeading.NORMAL.
Verwenden Sie die Aufzählung ParagraphHeading, um den Stil der Überschrift für ParagraphElement zu konfigurieren.
constbody=DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();// Append a paragraph, with heading 1.constpar1=body.appendParagraph('Title');par1.setHeading(DocumentApp.ParagraphHeading.HEADING1);// Append a paragraph, with heading 2.constpar2=body.appendParagraph('SubTitle');par2.setHeading(DocumentApp.ParagraphHeading.HEADING2);// Append a paragraph, with normal heading.constpar3=body.appendParagraph('Text');par3.setHeading(DocumentApp.ParagraphHeading.NORMAL);
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-12-22 (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."]]],[]]