A notes master in a presentation.
Notes masters define the default text styles and page elements for all notes pages. Notes masters are read-only.
Methods
Method | Return type | Brief description |
---|---|---|
getGroups() | Group[] | Returns the list of Group objects on the page. |
getImages() | Image[] | Returns the list of Image objects on the page. |
getLines() | Line[] | Returns the list of Line objects on the page. |
getObjectId() | String | Gets the unique ID for the page. |
getPageElementById(id) | PageElement | Returns the PageElement on the page with the given ID, or null if none exists. |
getPageElements() | PageElement[] | Returns the list of PageElement objects rendered on the page. |
getPlaceholder(placeholderType) | PageElement | Returns the placeholder PageElement object for a specified PlaceholderType or
null if a matching placeholder is not present. |
getPlaceholder(placeholderType, placeholderIndex) | PageElement | Returns the placeholder PageElement object for a specified PlaceholderType and
a placeholder index, or null if the placeholder is not present. |
getPlaceholders() | PageElement[] | Returns the list of placeholder PageElement objects in the page. |
getShapes() | Shape[] | Returns the list of Shape objects on the page. |
getSheetsCharts() | SheetsChart[] | Returns the list of SheetsChart objects on the page. |
getTables() | Table[] | Returns the list of Table objects on the page. |
getVideos() | Video[] | Returns the list of Video objects on the page. |
getWordArts() | WordArt[] | Returns the list of WordArt objects on the page. |
Detailed documentation
getGroups()
getImages()
getLines()
getObjectId()
Gets the unique ID for the page. Object IDs used by pages and page elements share the same namespace.
Return
String
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
getPageElementById(id)
Returns the PageElement
on the page with the given ID, or null
if none exists.
Parameters
Name | Type | Description |
---|---|---|
id | String | The ID of the page element that is being retrieved. |
Return
PageElement
— The page element with the given ID.
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
getPageElements()
Returns the list of PageElement
objects rendered on the page.
Return
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
getPlaceholder(placeholderType)
Returns the placeholder PageElement
object for a specified PlaceholderType
or
null
if a matching placeholder is not present.
If there are multiple placeholders with the same type, it returns the one with minimal placeholder index. If there are multiple matching placeholders with the same index, it returns the first placeholder from the page's page elements collection.
var slide = SlidesApp.getActivePresentation().getSlides()[0]; var placeholder = slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE);
Parameters
Name | Type | Description |
---|---|---|
placeholderType | PlaceholderType |
Return
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
getPlaceholder(placeholderType, placeholderIndex)
Returns the placeholder PageElement
object for a specified PlaceholderType
and
a placeholder index, or null
if the placeholder is not present.
If there are multiple placeholders with the same type and index, it returns the first placeholder from the page's page elements collection.
var slide = SlidesApp.getActivePresentation().getSlides()[0]; var placeholder = slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE, 0);
Parameters
Name | Type | Description |
---|---|---|
placeholderType | PlaceholderType | |
placeholderIndex | Integer |
Return
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
getPlaceholders()
Returns the list of placeholder PageElement
objects in the page.
var master = SlidesApp.getActivePresentation().getMasters()[0]; Logger.log('Number of placeholders in the master: ' + master.getPlaceholders().length);
Return
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
getShapes()
getSheetsCharts()
Returns the list of SheetsChart
objects on the page.
Return
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