0
After some tests I saw that summernote does not pass the name="" via ajax request, someone can tell me why?
$(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 everything went well, so I realized I can not pass HTML tag via ajax!
Guilherme, I did the way you told me, but in my console he returns me an Uncaught Rangeerror: Maximum call stack size exceeded
– Marcos Pereira
@This should be another problem, there’s some online link to it?
– Guilherme Nascimento
Guilherme, I don’t have no, I’m running via wamp.
– Marcos Pereira
@Marcospereira sends the entire HTML and Ajax code to Pastebin.com and then puts the link here in the comments for me to see
– Guilherme Nascimento
Ta ai Guilherme: https://pastebin.com/YGVXZGMa
– Marcos Pereira