Open pipiscrew opened 8 years ago
when click the preview button I getting :
looking through https://github.com/summernote/summernote/blob/develop/examples/textarea.html line26 - $('.summernote').summernote('code')
your example code : $('.preview-btn').click(function () { $('#preview-box').html($('.summernote').code()); $('.summernote').code(''); prettyPrint(); }); modified code : $('.preview-btn').click(function () { $('#preview-box').html($('.summernote').summernote('code')); $('.summernote').val(''); prettyPrint(); }); working, is buggy when inserting HTML code...
$('.preview-btn').click(function () { $('#preview-box').html($('.summernote').code()); $('.summernote').code(''); prettyPrint(); });
$('.preview-btn').click(function () { $('#preview-box').html($('.summernote').summernote('code')); $('.summernote').val(''); prettyPrint(); });
@pipiscrew please use
$('#summernote').summernote('code');
when click the preview button I getting :
looking through https://github.com/summernote/summernote/blob/develop/examples/textarea.html line26 - $('.summernote').summernote('code')
your example code :
$('.preview-btn').click(function () { $('#preview-box').html($('.summernote').code()); $('.summernote').code(''); prettyPrint(); });
modified code :$('.preview-btn').click(function () { $('#preview-box').html($('.summernote').summernote('code')); $('.summernote').val(''); prettyPrint(); });
working, is buggy when inserting HTML code...