📅  最后修改于: 2022-03-11 15:01:43.102000             🧑  作者: Mango
function CKupdate(){
for ( instance in CKEDITOR.instances ){
CKEDITOR.instances[instance].updateElement();
CKEDITOR.instances[instance].setData('');
}
}
$(document).ready(function(){
CKEDITOR.replace( 'comment-textarea' );
var options = {
success: function (html) {
$('#comments').append(html);
},
clearForm: true
};
$('#formcomments').submit(function() {
CKupdate();
});
$('#formcomments').ajaxForm(options);
});