title: SummerNote insertHtml
body: <p>I have a 'template' selector, that enables people to change the 'text/html' of the current textarea.</p>
  
  <p>So when they change templates, I need to update the Summernote HTML. I see the method for (insertText), but it doesn't work for HTML. </p>
  
  <p>Is there a solution for HTML version?</p>
  
  <p>I thought there was a .code() solution, but doesn't seem to be working?
  I receive an error, "Not a function"</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <pre><code>$('.dialogMessageArea').summernote({
              height:'230px',
              focus:true,
              toolbar: [
                  ['style', ['bold', 'italic', 'underline', 'clear']],
                  ['fontsize', ['fontsize']],
                  ['para', ['ul', 'ol', 'paragraph']],
                  ['table', ['table']],
                  ['misc', ['fullscreen','undo','redo']]
              ]
          });
  
          $(document).on('change', '.messageTemplate', function() {
              var templateId = $(this).selected().attr('value');
              if(templateId) {
                  $.ajax({
                      type: "POST",
                      dataType: "json",
                      url: '/cont/templates/GetTemplate',
                      data: {'templateId': templateId},
                      success: function (data) {
                          $('.subjectMessage').val(data.results[0].subject);
                          if(data.results[0].template) {
                              $('.dialogMessageArea').code(data.results[0].template);
                          }
                      },
                      error: function () {
                          alert('We were not able to get your template');
                      }
                  });
              }
          });
  </code></pre>
  
  <hr>
  
  <pre><code>console.log($('.dialogMessageArea'));
  console.log("&lt;b&gt;Welcome&lt;/b&gt;&lt;h3&gt;hello world&lt;/h3&gt;");
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PmXtj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PmXtj.png" alt="enter image description here"></a></p>