* IOException - if credentials file not found. * replacementText - New replacement text. * presentationId - id of the presentation. * Remove existing text in the shape, then insert new text. * Class to demonstrate the use of Slides Replace Text API */ Import .slides.v1.model.InsertTextRequest Import .slides.v1.model.DeleteTextRequest Import .slides.v1.model.BatchUpdatePresentationResponse Import .slides.v1.model.BatchUpdatePresentationRequest Which replaces all the text in a shape with new text: To ensure atomicity when you replace text this way, make sure to include both Specifying the same start position as well as the text string to be Call batchUpdate with the following two requests:.Identify the start and end position of the text to be replaced.
Identify the page element that contains the text.Insertion, which you can perform using the following steps: Replacing a specific region of text consists of a deletion and then an Individual ranges of text, and you can insert text at a specific location. The Slides API lets you modify the text content of a shape. To do a global search-and-replace throughout your presentation.ĭata guide provides an example of how you can use this request type. Method, but with different request types. There are two ways you can replace text in a presentation using the Slides API:īy performing a global search-and-replace, or by explicitly deleting and adding Also check out the above video to see a complete example (Python) combining several of the formatting concepts from the sections below. See the concepts page Text Structure and Styling forĪ general overview of how text styling works in the Slides API. You can change character formatting such as bold, italics, color, font size,.You can add paragraph formatting to create bulleted lists.You can insert, delete, or replace text in your presentation.The API lets you modify this text in a number of ways: Text in your presentation is always contained within a shape or a table cell.