套用至整段文字的樣式。
如果對應的 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 - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setIndentFirstLine(indent)
以點為單位,設定 TextRange 中段落首行的縮排。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
indent | Number | 要設定的縮排。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setIndentStart(indent)
以點為單位,設定 TextRange 中段落的文字起始縮排。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
indent | Number | 要設定的縮排。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setLineSpacing(spacing)
設定行距。
這個值對應於行間間距,以正常值的百分比表示。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
spacing | Number | 要設定的間距。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setParagraphAlignment(alignment)
設定 TextRange 中段落的 ParagraphAlignment。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
alignment | Paragraph | 要設定的對齊方式。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setSpaceAbove(space)
以點為單位,設定 TextRange 中段落上方的額外空間。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
space | Number | 要設定的空間。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setSpaceBelow(space)
以點為單位,設定 TextRange 中段落下方的額外空間。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
space | Number | 下方空間可供設定。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setSpacingMode(mode)
設定 TextRange 中段落的 SpacingMode。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
mode | Spacing | 要設定的間距模式。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
setTextDirection(direction)
設定 TextRange 中段落的 TextDirection。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
direction | Text | 要設定的文字方向。 |
回攻員
ParagraphStyle - This ParagraphStyle,用於鏈結。
授權
使用這個方法的指令碼需要下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations