Mit Sammlungen den Überblick behalten Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Textausrichtung
Eine Aufzählung der Textausrichtungstypen.
Wenn Sie ein Enum aufrufen möchten, rufen Sie die übergeordnete Klasse, den Namen und die Eigenschaft auf. Beispiel: DocumentApp.TextAlignment.NORMAL.
// Make the first character in the first paragraph of the active tab be// superscript.constdocumentTab=DocumentApp.getActiveDocument().getActiveTab().asDocumentTab();consttext=documentTab.getBody().getParagraphs()[0].editAsText();text.setTextAlignment(0,0,DocumentApp.TextAlignment.SUPERSCRIPT);
[[["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: 2025-07-26 (UTC)."],[[["\u003cp\u003eTextAlignment is used to set the alignment of text, such as normal, superscript, or subscript.\u003c/p\u003e\n"],["\u003cp\u003eYou can access TextAlignment properties using \u003ccode\u003eDocumentApp.TextAlignment\u003c/code\u003e followed by the specific property like \u003ccode\u003eNORMAL\u003c/code\u003e or \u003ccode\u003eSUPERSCRIPT\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe provided code snippet demonstrates how to apply superscript alignment to the first character of a paragraph.\u003c/p\u003e\n"]]],[],null,["TextAlignment\n\nAn enumeration of the type of text alignments.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nDocumentApp.TextAlignment.NORMAL`.\n\n```javascript\n// Make the first character in the first paragraph of the active tab be\n// superscript.\nconst documentTab =\n DocumentApp.getActiveDocument().getActiveTab().asDocumentTab();\nconst text = documentTab.getBody().getParagraphs()[0].editAsText();\ntext.setTextAlignment(0, 0, DocumentApp.TextAlignment.SUPERSCRIPT);\n``` \n\nProperties\n\n| Property | Type | Description |\n|---------------|--------|---------------------------------|\n| `NORMAL` | `Enum` | The normal text alignment. |\n| `SUPERSCRIPT` | `Enum` | The superscript text alignment. |\n| `SUBSCRIPT` | `Enum` | The subscript text alignment. |"]]