So, I have this function that creates a dialog box in HTML. This function is also passed a message, as can be seen below:
Apps Script code:
function emailPrompt(msg) {
  var html = HtmlService.createHtmlOutputFromFile('sendEmail')
      .setWidth(600)
      .setHeight(900);
    SpreadsheetApp.getUi()
      .showModalDialog(html, 'Send Email');
}
sendEmail.html
<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
  </head>
  <body>
    <textarea id="user-input-box" rows="38" cols="80"> [add pre-message here] </textarea>
    <input type="button" value="Submit" 
     onclick="google.script.run.MyMessage();" />
    <input type="button" value="Cancel" onclick="google.script.host.close();" 
     />
    <script>
      function MyNote() {
        var userInput = document.getElementById("user-input-box").value;
      }
    </script>
  </body>
</html>
How can I put the msg variable in the [add pre-message here] section of the textarea? I've been researching for hours online for this but really can't find anything.