Google Slides API Adds Text Formatting
Google Slides API Adds Text Formatting
Written by Kay Ewbank   
Tuesday, 03 January 2017

The G Suite team at Google has added text formatting to the recently released Slides API. 

The Google Slides API lets you generate presentation slides automatically from applications.The idea is that business data on inventory items such as retail merchandise, homes or property sales sites, or anything where you have a set of cataloged assets can be instantly turned into presentations based on pre-existing slide templates. This may sound like something you once had a nightmare about, but look on the bright side - if you can do it automatically you won't be asked to help the marketing department to do it manually!

slidesapi

 

The documentation says that:

"Apps can integrate with the Google Slides API to create beautiful slide decks automatically from user- and system-provided data. For example, you could use customer details from a database and combine them with predesigned templates and selected configuration options to create finished presentations in a fraction of the time it would take to create them manually."

The team behind the API has put together several videos showing how to automatically update text and images in slides, and how to generate slides from spreadsheet data. The latest round in this is a lesson in how to format text using the API.

 

You manipulate text in Google Slides by sending API requests in the form of JSON payloads sent to the API's batchUpdate() method. If you're writing text the process is fairly simple because all you need to provide is the text to be written. You can then format the text. For example, if you have the text "Hello World!" on a slide and want to make the Hello part bold, the JavaScript would look like this:
{
    "updateTextStyle": {
        "objectId": shapeID,
        "style": {
            "bold": true
        },
        "textRange": {
            "type": "FIXED_RANGE",
            "startIndex": 0,
            "endIndex": 5
        },
        "fields": "bold"
}
There are some good samples showing how to use these and other common API operations on the slides API pages.
 
slidesapi
 

More Information

Google Slides API pages

Related Articles

Google Adds Smart Scrolling To Mobile Maps

Play Google's AI Drawing Guessing Game  

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.

 

Banner


Progress Telerik DevCraft Adds Angular Support
06/02/2017

There's a new version of the Progress Telerik DevCraft suite with support for Angular, Visual Studio 2017, and JQuery 3.



Bjarne Stroustrup Thinks He Has A Better Way To Do Generics
01/02/2017

Bjarne Stroustrup is, of course, the inventor of C++. Over time he has added features to it and now he is proposing to add Concepts to make generics work like they always should have. 


More News

 

 
 

 

blog comments powered by Disqus

Last Updated ( Tuesday, 03 January 2017 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.