Return contents of rich text editor to servlet
<p>I want to return the contents of whatever is typed into the summernote rich text editor back to a servlet so I then can save it into a database but I cannot figure how to do it.</p>

<p>My jsp page script:</p>

<pre><code>&lt;script&gt;
  $(document).ready(function() 
  {
      $('#summernote').summernote();
  });
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
  var markupStr = $('#summernote').summernote('code'); //this gets the contents from the text editor.
  function myFunction()
  {
      return markupStr = $('#summernote').summernote('code');
  }
&lt;/script&gt;
</code></pre>

<p>Button in jsp to submit to servlet:</p>


        new content: 
        here 


<p>Servlet:</p>

<pre><code>String test = request.getParameter("summerNoteText");
</code></pre>