应用于整个段落的文本样式。
如果相应的 TextRange 跨越多个段落,并且这些段落对于所调用的读取方法具有不同的值,则此类中的读取方法会返回 null。为避免这种情况,请使用 Paragraph.getRange() 方法返回的 TextRange 查询段落样式。
如果您使用的方法会修改文字在形状中的排布方式,则应用于段落样式的任何自动调整设置都会停用。
方法
详细文档
getIndentEnd()
getIndentFirstLine()
getIndentStart()
getLineSpacing()
返回行间距;如果给定文本具有多种段落样式,则返回 null。
此值表示行间距,以正常行间距的百分比表示。 正常表示为 100.0。
返回
Number|null
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getParagraphAlignment()
返回 TextRange 中段落的 ParagraphAlignment,如果给定文本有多种段落样式,则返回 null。
返回
ParagraphAlignment|null
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSpaceAbove()
getSpaceBelow()
getSpacingMode()
返回 TextRange 中段落的 SpacingMode,如果给定文本具有多种段落样式,则返回 null。
返回
SpacingMode|null
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getTextDirection()
返回 TextRange 中段落的 TextDirection,如果给定文本具有多种段落样式,则返回 null。
返回
TextDirection|null
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setIndentEnd(indent)
设置 TextRange 中段落的文本末尾缩进(以磅为单位)。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
indent | Number | 要设置的缩进。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setIndentFirstLine(indent)
以磅为单位设置 TextRange 中段落第一行的缩进。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
indent | Number | 要设置的缩进。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setIndentStart(indent)
设置 TextRange 中段落的文字起始缩进(以磅为单位)。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
indent | Number | 要设置的缩进。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setLineSpacing(spacing)
设置行间距。
此值表示行间距,以正常行间距的百分比表示。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
spacing | Number | 要设置的间距。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setParagraphAlignment(alignment)
设置 TextRange 中段落的 ParagraphAlignment。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
alignment | Paragraph | 要设置的对齐方式。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setSpaceAbove(space)
以点为单位设置 TextRange 中段落上方的额外空间。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
space | Number | 要设置的上方边距。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setSpaceBelow(space)
以磅为单位设置 TextRange 中段落下方的额外空间。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
space | Number | 下方用于设置的空格。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setSpacingMode(mode)
为 TextRange 中的段落设置 SpacingMode。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
mode | Spacing | 要设置的间距模式。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setTextDirection(direction)
为 TextRange 中的段落设置 TextDirection。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
direction | Text | 要设置的文字方向。 |
返回
ParagraphStyle - 此 ParagraphStyle,用于链式调用。
授权
使用此方法的脚本需要获得以下一项或多项范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations