Class Paragraph

  • A Paragraph is a segment of text terminated by a newline character.

  • The getIndex() method returns the index of the paragraph's newline.

  • The getRange() method returns a TextRange spanning the text in the paragraph.

  • Both getIndex() and getRange() require specific authorization scopes.

Paragraph

A segment of text terminated by a newline character.

Methods

MethodReturn typeBrief description
getIndex() IntegerReturns 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.