I’ve brought many of those concepts together to create a single publisher to expose your scripts, scriptdb data and other public content in a variety of formats such as standalone web page, a js function that returns the html code for a page, as json data and as jsonp data. I’ve also included a code prettifier and json beautifier in the code.
The main purpose of this is to be able to publish your code snippets or scriptdb data as dynamic content in iFrames in other web sites, or to get the content as Json data. However, same domain restrictions on iFrames and jSon make this hard to achieve. The js and jsonp options mitigate these issues allowing you to embed source code in a variety of hosts. Here is how it fits together.
And here is an example of embedding some source code (in this case the library code to do this) in this blog using an iFrame with this code.
I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time.
The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it.
I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.
bruce mcpherson is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.mcpher.com. Permissions beyond the scope of this license may be available at code use guidelines