title: Get HTML from Delta on Quill
body: <p>I am trying to get HTML code from delta on Quill.</p>
  
  <p>This is my code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;!-- Main Quill library --&gt;
  &lt;script src="http://cdn.quilljs.com/1.2.0/quill.js"&gt;&lt;/script&gt;
  &lt;script src="http://cdn.quilljs.com/1.2.0/quill.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Theme included stylesheets --&gt;
  &lt;link href="http://cdn.quilljs.com/1.2.0/quill.snow.css" rel="stylesheet"&gt;
  &lt;link href="http://cdn.quilljs.com/1.2.0/quill.bubble.css" rel="stylesheet"&gt;
  
  
      &lt;title&gt;Editor&lt;/title&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="toolbar"&gt;&lt;/div&gt;
  &lt;div id="editor"&gt;&lt;/div&gt;
  &lt;script&gt;
  
  var toolbarOptions = [
  ['bold', 'italic', 'underline', 'strike'],
  ['blockquote', 'code-block'],
  [{'header': 1}, {'header': 2}],
  [{'list': 'ordered'}, {'list': 'bullet'}],
  [{'script': 'sub'}, {'script': 'super'}],
  [{'indent': '-1'}, {'indent': '+1'}],
  [{'direction': 'rtl'}],
  [{'size': ['small', false, 'large', 'huge']}],
  ['link', 'image', 'video', 'formula'],
  [{'color': []}, {'background': []}],
  [{'font': []}],
  [{'align': []}]
  ];
  var options = {
    debug: 'info',
    modules: {
      toolbar: toolbarOptions
    },
    placeholder: 'Textttt',
    readOnly: false,
    theme: 'snow'
  };
  var editor = new Quill('#editor', options);
      var delta = quill.getContents();
  function quillGetHTML(inputDelta) {
      var tempCont = document.createElement("div");
      (new Quill(tempCont)).setContents(inputDelta);
      return tempCont.getElementsByClassName("ql-editor")[0].innerHTML;
  }
  function callMe(){
  $(document).ready(function(){$("#btn1").click(function(){$("p").append(quillGetHTML(delta));});});}
  &lt;/script&gt;
  &lt;p&gt;HTML: &lt;/p&gt;
  &lt;button id="btn1" onClick="callMe()"&gt;Get HTML From Delta&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I click on the button, nothing appears, I checked <code>callMe()</code> function and it works, this means that the problem is extracting HTML from delta.</p>