Class Paragraph
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Paragraphe
Segment de texte terminé par un caractère de nouvelle ligne.
Méthodes
Méthode | Type renvoyé | Brève description |
getIndex() | Integer | Renvoie l'index de la nouvelle ligne du paragraphe. |
getRange() | TextRange | Renvoie un TextRange couvrant le texte du paragraphe se terminant par le caractère de nouvelle ligne de cet objet. |
Documentation détaillée
getIndex()
Renvoie l'index de la nouvelle ligne du paragraphe. Renvoie null
si la nouvelle ligne a été supprimée.
Renvois
Integer
Autorisation
Les scripts qui utilisent cette méthode nécessitent une autorisation avec un ou plusieurs des champs d'application suivants:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getRange()
Renvoie un TextRange
couvrant le texte du paragraphe se terminant par le caractère de nouvelle ligne de cet objet. Renvoie null
si la nouvelle ligne du paragraphe a été supprimée.
Renvois
TextRange
Autorisation
Les scripts qui utilisent cette méthode nécessitent une autorisation avec un ou plusieurs des champs d'application suivants:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 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`"]]