title: Save whole table html code in a variable
body: <p>I have a table where the cell content is editable. 
  Now I want, after I finished editing the table, the html code from the table with all values. </p>
  
  <p>Here is a table:</p>
  
  <pre><code>&lt;table class="table table-bordered content"&gt;
          &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;bla&lt;/th&gt;
              &lt;th&gt;bla bla&lt;/th&gt;
              &lt;th&gt;bla bla bla &lt;/th&gt;
              &lt;th&gt;more bla&lt;/th&gt;
          &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
          &lt;tr contenteditable="true"&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr contenteditable="true"&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  
  &lt;button id="save"&gt;Save&lt;/button&gt;
  </code></pre>
  
  <p>That's my JS code: </p>
  
  <pre><code>    $('#save').on('click', function () {
          var table = $('.content').html();
          alert(table);
      });
  </code></pre>
  
  <p>The problem is that if I console.log the table variable I get this output: </p>
  
  <pre><code>  &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;bla&lt;/th&gt;
              &lt;th&gt;bla bla&lt;/th&gt;
              &lt;th&gt;bla bla bla &lt;/th&gt;
              &lt;th&gt;more bla&lt;/th&gt;
          &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
          &lt;tr contenteditable="true"&gt;
              &lt;td&gt;dwad&lt;/td&gt;
              &lt;td&gt;dwada&lt;/td&gt;
              &lt;td&gt;dawdaw&lt;/td&gt;
              &lt;td&gt;dawdaw&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr contenteditable="true"&gt;
              &lt;td&gt;daw&lt;br&gt;&lt;/td&gt;
              &lt;td&gt;daw&lt;br&gt;&lt;/td&gt;
              &lt;td&gt;dwadaw&lt;br&gt;&lt;/td&gt;
              &lt;td&gt;daw&lt;br&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;/tbody&gt;
  </code></pre>
  
  <p>If you have a closer look you can see that the </p>
  
  <p><code>&lt;table class=" ... "&gt;</code> and the <code>&lt;/table&gt;</code> tag are gone but I also need them. 
  Does someone know what I can do to also get the table-tags ? </p>