将summernote文本传递给Ajax

I'm not a pro with ajax and javascript in general so I have to ask. I have a form with an editor inside (summernote editor)

<div id="summernote">summernote text</div>

Then I send form data throught this ajax function:

$( '#form-create-project' ).submit( function( e ) {
    $.ajax({
      url: 'create_project.php',
      type: 'POST',
      data: new FormData( this ),
      processData: false,
      contentType: false
    });
    e.preventDefault();
});

But I can't find a way to pass the summernote value too, I've tried with that:

var content = $('textarea[name="content"]').html($('#summernote').code());

but I don't know where to place that inside the js above. When I try to insert it the form on submit refresh the page instead of execute ajax, so I think I placed it in the wrong place.

Someone can help me?

Can you try to escape the html code before to submit:

For Example:

txtText.summernote({ height: 400, lang: 'es-ES'});

$.fn.htmlEscape = function () {

    return this.val().trim()
        .replace(/&/g, '&amp;')
        .replace(/"/g, '&quot;')
        .replace(/'/g, '&#39;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;');
},

// I needed the opposite function today, so adding here too:
$.fn.htmlUnescape = function () {

    return this.val().trim()
        .replace(/&quot;/g, '"')
        .replace(/&#39;/g, "'")
        .replace(/&lt;/g, '<')
        .replace(/&gt;/g, '>')
        .replace(/&amp;/g, '&');
},

function getDataForm() {

        var data = new FormData();

        if (Files.ImageSelection.getAction() === "choose") {
            data.append("ImagePath", ImagePath);
        }
        else {
            var files = Files.ImageSelection.getSelectedFile().get(0).files;
            if (files.length > 0) {
                data.append("File", files[0]);
            }
            data.append("ImagePath", "");
        }

        data.append("Id", SectionId);
        data.append("Title", txtTitle.val().trim());
        data.append("Text", txtText.htmlEscape());
        data.append("TypeId", cboType.val());

        return data;
    }

You could add the value simply to formData using append() beforre the sent :

formData.append("summernote", $('#summernote').text() );

Full code like :

var formData = new FormData( this );
formData.append("summernote", $('#summernote').text() );

$.ajax({
  url: 'create_project.php',
  type: 'POST',
  data: formData,
  processData: false,
  contentType: false
});

Hope this helps.