Stay organized with collections Save and categorize content based on your preferences.
ParagraphStyleThe styles of text that apply to entire paragraphs.
Read methods in this class return null
if the corresponding TextRange
spans multiple paragraphs, and those paragraphs have different values for the read method being called. To avoid this, query for paragraph styles using the TextRange
returned by the Paragraph.getRange()
method.
If you use methods that edit how text fits within a shape, any autofit settings applied to the paragraph styles are deactivated.
Detailed documentationgetIndentEnd()
Returns the text end indentation for paragraphs in the TextRange
in points, or null
if there are multiple paragraph styles on the given text.
The side that corresponds to the end of the text is based on the current text direction.
ReturnNumber
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getIndentFirstLine()
Returns the indentation for the first line of paragraphs in the TextRange
in points, or null
if there are multiple paragraph styles on the given text.
Number
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getIndentStart()
Returns the text start indentation for paragraphs in the TextRange
in points, or null
if there are multiple paragraph styles on the given text.
The side that corresponds to the start of the text is based on the current text direction.
ReturnNumber
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getLineSpacing()
Returns the line spacing, or null
if there are multiple paragraph styles on the given text.
This is a value that corresponds to the space between lines, as a percentage of normal. Normal is represented as 100.0.
ReturnNumber
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getParagraphAlignment()
Returns the ParagraphAlignment
of paragraphs in the TextRange
, or null
if there are multiple paragraph styles on the given text.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getSpaceAbove()
Returns the extra space above paragraphs in the TextRange
in points, or null
if there are multiple paragraph styles on the given text.
Number
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getSpaceBelow()
Returns the extra space below paragraphs in the TextRange
in points, or null
if there are multiple paragraph styles on the given text.
Number
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getSpacingMode()
Returns the SpacingMode
for paragraphs in the TextRange
, or null
if there are multiple paragraph styles on the given text.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
getTextDirection()
Returns the TextDirection
for paragraphs in the TextRange
, or null
if there are multiple paragraph styles on the given text.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setIndentEnd(indent)
Sets the text end indentation for paragraphs in the TextRange
in points.
The side that corresponds to the end of the text is based on the current text direction.
Parameters Name Type Descriptionindent
Number
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setIndentFirstLine(indent)
Sets the indentation for the first line of paragraphs in the TextRange
in points.
indent
Number
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setIndentStart(indent)
Sets the text start indentation for paragraphs in the TextRange
in points.
The side that corresponds to the start of the text is based on the current text direction.
Parameters Name Type Descriptionindent
Number
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setLineSpacing(spacing)
Sets the line spacing.
This is a value that corresponds to the space between lines, as a percentage of normal. Normal is represented as 100.0.
Parameters Name Type Descriptionspacing
Number
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setParagraphAlignment(alignment)
Sets the ParagraphAlignment
of paragraphs in the TextRange
.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setSpaceAbove(space)
Sets the extra space above paragraphs in the TextRange
in points.
space
Number
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setSpaceBelow(space)
Sets the extra space below paragraphs in the TextRange
in points.
space
Number
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setSpacingMode(mode)
Sets the SpacingMode
for paragraphs in the TextRange
.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
setTextDirection(direction)
Sets the TextDirection
for paragraphs in the TextRange
.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/presentations.currentonly
https://www.googleapis.com/auth/presentations
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."],[[["`ParagraphStyle` encompasses the styles applied to entire paragraphs within Google Slides."],["When reading paragraph styles across multiple paragraphs, methods return `null` if the paragraphs have differing style values; use `Paragraph.getRange()` for consistent results."],["Autofit settings are deactivated if methods altering text fitting within a shape are employed."],["This class provides methods to get and set various paragraph attributes, such as indentation, line spacing, alignment, spacing above/below, spacing mode, and text direction."],["These methods require authorization with specific scopes like `https://www.googleapis.com/auth/presentations.currentonly` or `https://www.googleapis.com/auth/presentations` to function correctly."]]],[]]
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