Reading content from google doc using JavaScript and displaying on web page - google-apps-script

I am new to apps script and google drive / docs apis. My requirement is that I am authoring my blog / content using google doc. Once authored I want to fetch these docs and display on my web page as html.
I am looking for JavaScript library which can fetch google docs as html and I can then display fetched content in a on html page.

Related

How do I reference a support file in Google Apps project

Is it possible to use a support file from within the apps script project as a source for iframe in another HTML.
I need to do this as a part of a Web App project in Google Apps Script.
Specifically I need it to work as a menu system which is the same across multiple pages, so that I don't have to repeat the same HTML code over and over again.
Better explained in a picture
Left side menu(buttons) stays the same across pages
There are several ways to accomplish what you are looking (" I don't have to repeat the same HTML code over and over again") but using iframe is not the best way when working with Google Apps Script web applications.
First you have to decide if you want to handle your web application as a multipage or as simple page.
In any case you might find helpful to use templated HTML / scriptlets to pass the code from Google Apps Script .html files to your main html code. If you find yourself scripts hard to start with, then you might use other methods of the HTML Service
Resources
https://developers.google.com/apps-script/guides/html/
https://developers.google.com/apps-script/guides/html/templates
https://developers.google.com/apps-script/reference/html
Related
Use project Javascript and CSS files in a Google Apps Script web app?
Recent related question (no answers at this time, but with comments)
HTML Service: Templated HTML as sidebar
Is it possible to create navigation bar on Google Apps Script?
how to connect a navigation bar (<nav>) with HTML files in google appscript?

How to generate an HTML view in App Script from a Google Sheet

I have a client that uses Google forms to take orders and wants to be able to turn the resulting Sheet into a document of Packing Slips. Being a python person I am currently taking her .tsv and making nice HTML printable docs but want to be able to make a plug-in for her so that on any Sheet of this type she can click "Make Packing Slips" and it either opens a new tab with generated HTML (I'm ok using googles templating) or maybe even convert the HTML into a PDF and save it to her drive? Either way I'd rather design the document all in HTML and CSS rather than trying to make a google doc if at all possible. Is the feasible? Any starting points? Thanks!
You need to learn about Google App Script => https://developers.google.com/apps-script/overview
Then these Links should suffice
HTML Service: Create and Serve HTML
Google Container-bound Scripts for Google App Script (Can not post link for this due to low reputation)

Google Apps script forms using HTML and JavaScript

Is it possible to get the Edit URLs and pre-filled URLs of html web forms using google apps script/javascript in the same way we can get the Edit URLs and pre-filled URLs of google forms?
How is it possible to get the pre-filled functionality with html forms instead of google forms?
Can someone please point me in right direction?
Using templated HTML, along with the doGet function used by all web apps, it could be done.
Refer to URL Parameters and Pushing Variables to Templates from google's developer site.

Embed google trends chart in google document

is there a way to embed a google trend chart from Google Trend service into a google drive document?
I see the option embed there but it gives you a JS to put on an html document. I'm looking more to embed it in a document in google docs, maybe with the Script Editor.
Thanks.
The google script docs says you can't add iframe (the embed snippet is an iframe). Your best option is to screenshot it.

generating pdf thumbnails in Google Sites

Is there a script that can generate a PDF thumbnail in Google sites. Right now I'm using DocList to fetch the name and size of some PDF files in my Google drive and list them on Google Sites. I would like a script that can generate the pdf thumbail of those files as well.
No, You can not get the file icons programatically. You need to use icon images to display it in UI using UIService or HtmlService. You may check a example by Saqib Ali here. He is uisng UiService and DocList to display the Items in a collection.