I'm trying to include a scriptlet in my apps script project so that I can separate html and css. When I do this, the scriptlet is printing out as plain text and the css isn't changing my html. I've included my code below!
HTML
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<?!= include('css') ?>
</head>
<body>
code.gs
var ui = SpreadsheetApp.getUi();
/**
* Creates menu add on for Google sheets.
* Runs the function sendEmails
*/
function onOpen () {
ui.createMenu('Mail Merge')
.addItem('Start mail merge utility', 'sendEmails')
.addItem('Show prompt', 'myMenuPrompt')
.addToUi();
}
function onInstall(e) {
onOpen(e);
}
function myMenuPrompt(){
var html = HtmlService
.createHtmlOutputFromFile('index')
.setWidth(500)
.setHeight(370);
ui.showModalDialog(html, 'my app');
}
function include(filename) {
return HtmlService.createHtmlOutputFromFile(filename)
.getContent();
}