A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/apps-script/reference/document/paragraph-heading below:

Enum ParagraphHeading | Apps Script

Enum ParagraphHeading

Stay organized with collections Save and categorize content based on your preferences.

ParagraphHeading

An enumeration of the standard paragraph headings.

To call an enum, you call its parent class, name, and property. For example, DocumentApp.ParagraphHeading.NORMAL.

Use the ParagraphHeading enumeration to configure the heading style for 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);
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. TITLE Enum The title heading option. SUBTITLE Enum The subtitle heading option.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-12-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 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."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4