Reputation: 11
Using Google Apps Script, how can I accomplish the same as "Insert" -> "Document" within the Google Sites Editor?
Using GAS, I can obtain the URL and/or the ID of a document, but I cannot create the equivalent of an embedded Google Document within a Google Site Page.
I have been able to insert an <iframe>
, but that assumes that the document has been published as a web-document.
I can copy the html from an existing page and using replace()
substitute a different ID, but that only appears to work if the original page gadget has borders and title turned on.
Upvotes: 0
Views: 391
Reputation: 7957
I think the approach you mentioned should work. Have a 'template' page with a dummy Google Document inserted in it and then use Apps Script to replace the dummy with your document. Can you put in some code around the replace you have.
Upvotes: 1