Reputation: 5811
I have an .html
file in Google Drive. Is it possible to use it with HtmlService
?
I know this code will render the Index.html
file within the project.
function doGet() {
return HtmlService.createHtmlOutputFromFile('Index');
}
But how can I get it to render a file that is in Google Drive?
My idea is that users would collaborate on an .html
file outside of the web-app and the web-app would render t.
Upvotes: 3
Views: 931
Reputation: 201368
If my understanding is correct, how about this modification? The flow of this modified script is as follows.
function doGet() {
var fileId = "###"; // Please set the fileID of HTML file on Google Drive.
var html = DriveApp.getFileById(fileId).getBlob().getDataAsString();
return HtmlService.createHtmlOutput(html);
}
If I misunderstood your question, I apologize.
Upvotes: 5