Class Paragraph
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Paragrafo
Un segmento di testo terminato da un carattere di nuova riga.
Metodi
Metodo | Tipo restituito | Breve descrizione |
getIndex() | Integer | Restituisce l'indice del nuovo riga del paragrafo. |
getRange() | TextRange | Restituisce un TextRange che include il testo del paragrafo terminato dal carattere di nuova riga di questo oggetto. |
Documentazione dettagliata
getIndex()
Restituisce l'indice del nuovo riga del paragrafo. Restituisce null
se il nuovo riga è stato eliminato.
Invio
Integer
Autorizzazione
Gli script che utilizzano questo metodo richiedono l'autorizzazione con uno o più dei seguenti ambiti:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getRange()
Restituisce un TextRange
che include il testo del paragrafo terminato dal carattere di nuova riga di questo oggetto. Restituisce null
se il paragrafo è stato eliminato.
Invio
TextRange
Autorizzazione
Gli script che utilizzano questo metodo richiedono l'autorizzazione con uno o più dei seguenti ambiti:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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`"]]