Class Paragraph
Stay organized with collections
Save and categorize content based on your preferences.
Paragraph
A segment of text terminated by a newline character.
Methods
Method | Return type | Brief description |
getIndex() | Integer | Returns the index of the paragraph's newline. |
getRange() | TextRange | Returns a TextRange spanning the text in the paragraph ended by this object's newline
character. |
Detailed documentation
getIndex()
Returns the index of the paragraph's newline. Returns null
if the newline has been
deleted.
Return
Integer
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
getRange()
Returns a TextRange
spanning the text in the paragraph ended by this object's newline
character. Returns null
if the paragraph's newline has been deleted.
Return
TextRange
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
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.
[null,null,["Last updated 2024-12-02 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`"]]