After some test I saw that summernote does not pass the name via ajax request, can someone tell me why this?
$(document).ready(function(){
$(document).on('click', '#submit_btn', function(){
var titulo = $('#titulo').val();
var dica = $('#dica').val();
$.ajax({
url: 'salvar_dica.php',
type: 'POST',
data: {
'save': 1,
'titulo': titulo,
'dica': dica,
},
success: function(response){
$('#titulo').val('');
$('#dica').val('');
$('#display_area').append(response);
}
});
});
});
<textarea type="text" name="dica" id="dica" class="summernote" class="form-control"></textarea>
$(document).ready(function() {
$('.summernote').summernote();
});
I ran without ajax and it worked fine, so I realized I can not seem to pass HTML tags via ajax!