I have a string that is faux-html. ie:
var myHtml = "<div style=\"background:color:#000\">This is text</div>";
(Obviously its much longer and more complex than that, but it's a string nonetheless).
In apps script I need to send that to an API as actual HTML. so I want to convert the string to an actual Html Object.
I can make an actual Html file in the sidebar and reference that with 'CreateHtmlOutputfromFile(file)', but would prefer to not have to actually make the blank html file.
Is there any way of making a floating html file? Something to the effect of:
var myHtml = "<div style=\"background:color:#000\">This is text</div>";
var htmlOutput = HtmlService.CreateHtmlOutput();
htmlOutput.innerHTML = myHtml;