The styles of text that apply to entire paragraphs.
Read methods in this class return null
if the corresponding Text
spans
multiple paragraphs, and those paragraphs have different values for the read method being called.
To avoid this, query for paragraph styles using the Text
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.
Methods
Method | Return type | Brief description |
---|---|---|
get | Number | Returns the text end indentation for paragraphs in the Text in points, or null if there are multiple paragraph styles on the given text. |
get | Number | Returns the indentation for the first line of paragraphs in the Text in points, or
null if there are multiple paragraph styles on the given text. |
get | Number | Returns the text start indentation for paragraphs in the Text in points, or null if there are multiple paragraph styles on the given text. |
get | Number | Returns the line spacing, or null if there are multiple paragraph styles on the given
text. |
get | Paragraph | Returns the Paragraph of paragraphs in the Text , or null
if there are multiple paragraph styles on the given text. |
get | Number | Returns the extra space above paragraphs in the Text in points, or null if
there are multiple paragraph styles on the given text. |
get | Number | Returns the extra space below paragraphs in the Text in points, or null if
there are multiple paragraph styles on the given text. |
get | Spacing | Returns the Spacing for paragraphs in the Text , or null if
there are multiple paragraph styles on the given text. |
get | Text | Returns the Text for paragraphs in the Text , or null if
there are multiple paragraph styles on the given text. |
set | Paragraph | Sets the text end indentation for paragraphs in the Text in points. |
set | Paragraph | Sets the indentation for the first line of paragraphs in the Text in points. |
set | Paragraph | Sets the text start indentation for paragraphs in the Text in points. |
set | Paragraph | Sets the line spacing. |
set | Paragraph | Sets the Paragraph of paragraphs in the Text . |
set | Paragraph | Sets the extra space above paragraphs in the Text in points. |
set | Paragraph | Sets the extra space below paragraphs in the Text in points. |
set | Paragraph | Sets the Spacing for paragraphs in the Text . |
set | Paragraph | Sets the Text for paragraphs in the Text . |
Detailed documentation
getIndentEnd()
Returns the text end indentation for paragraphs in the Text
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.
Return
Number
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
getIndentFirstLine()
Returns the indentation for the first line of paragraphs in the Text
in points, or
null
if there are multiple paragraph styles on the given text.
Return
Number
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
getIndentStart()
Returns the text start indentation for paragraphs in the Text
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.
Return
Number
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
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.
Return
Number
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
getParagraphAlignment()
Returns the Paragraph
of paragraphs in the Text
, or null
if there are multiple paragraph styles on the given text.
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
getSpaceAbove()
Returns the extra space above paragraphs in the Text
in points, or null
if
there are multiple paragraph styles on the given text.
Return
Number
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
getSpaceBelow()
Returns the extra space below paragraphs in the Text
in points, or null
if
there are multiple paragraph styles on the given text.
Return
Number
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
getSpacingMode()
Returns the Spacing
for paragraphs in the Text
, or null
if
there are multiple paragraph styles on the given text.
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
getTextDirection()
Returns the Text
for paragraphs in the Text
, or null
if
there are multiple paragraph styles on the given text.
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
setIndentEnd(indent)
Sets the text end indentation for paragraphs in the Text
in points.
The side that corresponds to the end of the text is based on the current text direction.
Parameters
Name | Type | Description |
---|---|---|
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
setIndentFirstLine(indent)
Sets the indentation for the first line of paragraphs in the Text
in points.
Parameters
Name | Type | Description |
---|---|---|
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 Text
in points.
The side that corresponds to the start of the text is based on the current text direction.
Parameters
Name | Type | Description |
---|---|---|
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
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 | Description |
---|---|---|
spacing | 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 Paragraph
of paragraphs in the Text
.
Parameters
Name | Type | Description |
---|---|---|
alignment | Paragraph |
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
setSpaceAbove(space)
Sets the extra space above paragraphs in the Text
in points.
Parameters
Name | Type | Description |
---|---|---|
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 Text
in points.
Parameters
Name | Type | Description |
---|---|---|
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 Spacing
for paragraphs in the Text
.
Parameters
Name | Type | Description |
---|---|---|
mode | Spacing |
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
setTextDirection(direction)
Sets the Text
for paragraphs in the Text
.
Parameters
Name | Type | Description |
---|---|---|
direction | Text |
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