title: Is there a function or example for converting html string to plaintext without html tags using Google Apps Script?
body: <p>In JavaScript this solution would do the job:</p>
  
  <pre><code>function strip(html)
  {
     var tmp = document.createElement("DIV");
     tmp.innerHTML = html;
     return tmp.textContent || tmp.innerText || "";
  }
  </code></pre>
  
  <p>However document is not available in Google Apps Script to my knowledge. Is there another alternative to parse and display plain text from html in Google Apps Script? </p>
  
  <p>I have tried using the </p>
  
  <pre><code>HtmlService.createHtmlOutput('&lt;b&gt;Hello, world!&lt;/b&gt;').getContent();
  </code></pre>
  
  <p>However this just displays the text with all the tags.</p>
  
  <p>My expectation would be that input of </p>
  
  <pre><code>'&lt;b&gt;Hello, world!&lt;/b&gt;'
  </code></pre>
  
  <p>Would output</p>
  
  <pre><code>'Hello, world!'
  </code></pre>