Class Paragraph
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Paragraf
Segmen teks yang diakhiri dengan karakter baris baru.
Metode
Metode | Jenis hasil yang ditampilkan | Deskripsi singkat |
getIndex() | Integer | Menampilkan indeks baris baru paragraf. |
getRange() | TextRange | Menampilkan TextRange yang mencakup teks dalam paragraf yang diakhiri dengan karakter baris baru objek ini. |
Dokumentasi mendetail
getIndex()
Menampilkan indeks baris baru paragraf. Menampilkan null
jika baris baru telah
dihapus.
Pulang pergi
Integer
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getRange()
Menampilkan TextRange
yang mencakup teks dalam paragraf yang diakhiri dengan karakter baris baru objek ini. Menampilkan null
jika baris baru paragraf telah dihapus.
Pulang pergi
TextRange
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 UTC."],[[["\u003cp\u003eA Paragraph object represents a segment of text terminated by a newline character within Google Slides.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods like \u003ccode\u003egetIndex()\u003c/code\u003e to retrieve the newline's index and \u003ccode\u003egetRange()\u003c/code\u003e to obtain a TextRange encompassing the paragraph's text.\u003c/p\u003e\n"],["\u003cp\u003eBoth methods require authorization with specific scopes for accessing and manipulating presentations.\u003c/p\u003e\n"]]],[],null,["# Class Paragraph\n\nParagraph\n\nA segment of text terminated by a newline character. \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------|-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| [getIndex()](#getIndex()) | `Integer` | Returns the index of the paragraph's newline. |\n| [getRange()](#getRange()) | [TextRange](/apps-script/reference/slides/text-range) | Returns a [TextRange](/apps-script/reference/slides/text-range) spanning the text in the paragraph ended by this object's newline character. |\n\nDetailed documentation\n----------------------\n\n### `get``Index()`\n\nReturns the index of the paragraph's newline. Returns `null` if the newline has been\ndeleted.\n\n#### Return\n\n\n`Integer`\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Range()`\n\nReturns a [TextRange](/apps-script/reference/slides/text-range) spanning the text in the paragraph ended by this object's newline\ncharacter. Returns `null` if the paragraph's newline has been deleted.\n\n#### Return\n\n\n[TextRange](/apps-script/reference/slides/text-range)\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`"]]