title: Problem with JS grabbing content from Google Doc and inserting it into a div id
body: <p>Good evening,</p>
  <p>I have developed a JavaScript that is responsible for inserting all the HTML content of Google Docs published on the web in a div with id attribute, something similar to an iframe, but without cloning the Google stylesheet.</p>
  <p>Here is an example!</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// script to grab googledoc info &amp; inject it directly onto the page
  function get_googledoc(link, callback) { 
   var xhr = new XMLHttpRequest(); 
   xhr.open("GET", link, true); 
   xhr.onreadystatechange = function() { 
   if (xhr.readyState === 4) { 
   callback(xhr.responseText); 
   } 
   }; 
   xhr.send(null); 
  } 
   
  get_googledoc ( 
   "https://docs.google.com/document/d/e/2PACX-1vQFFMz6wwmc0TTQ7upeSvs1DxKSpPlagB_bvtqdXPSIlShCX4FE57fowgRBdY34pDw24GYhZ_G2W_lX/pub?embedded=true", 
   function(text) { 
   var div = document.getElementById("test"); 
   div.innerHTML = text; 
   
   // and remove css that comes with google doc 
   div.removeChild(div.childNodes[1]); 
   div.removeChild(div.childNodes[0]); 
   } 
  ); </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="test"&gt;&lt;/div&gt; </code></pre>
  </div>
  </div>
  </p>
  <p>The problem arises when, after publishing the document on the web, and transforming it into HTML inside the div with id attribute, it does not use b, i, strong, em tags for the words in bold or italics, but uses a div with class attribute where it resorts to alternatives such as font-weight or font-style.</p>
  <p>Google Docs updates every so often, so if I get to style, for example, the class c4, when the document is updated it will change that class value to another one, and so on.</p>
  <p><a href="https://i.stack.imgur.com/F0PE8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F0PE8.png" alt="enter image description here" /></a></p>
  <p>I've been thinking about a solution, but I can't come up with one.</p>
  <p>Can you think of anything?</p>
  <p>Thank you very much in advance.</p>