title: showing full email template saved in db to a div jquery
body: <p>I have been saving email templates to <code>PostgreSQL</code>, they are like this <a href="https://codepen.io/anon/pen/EoyzVR" rel="nofollow noreferrer">https://codepen.io/anon/pen/EoyzVR</a>, But I am unable to show this html to a div with an id of <code>dat</code>.</p>
  
  <pre><code>    template = $($.parseXML(data)).children('html') #its from an already answered question
      # console.log template
      # $("#dat").innerHTML(template.data)
      console.log template
      document.getElementById('dat').innerHTML=template
      # page.innerHTML(template)
  </code></pre>
  
  <p>I have tried the above things, also prevent using innerHTML and just use <code>.add</code>, <code>.append</code>, <code>.html</code> for div with an id <code>dat</code>but either it's coming as an object if I do this</p>
  
  <pre><code>template = $($.parseHTML(data)).html()
  </code></pre>
  
  <p>Is there any possibility to show this in a div? </p>
  
  <p>UPDATE:
  Template variable after <code>$.parseHTML</code> looks like this</p>
  
  <p><a href="https://i.stack.imgur.com/Loew2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Loew2.png" alt="enter image description here"></a></p>