Reputation: 1030
How to get the save event in ckeditor so I can make ajax call to save the data.
Upvotes: 1
Views: 2383
Reputation: 11
.formSubmit is class name of form,
var data = CKEDITOR.instances.editor1.getData(); this is data of textarea
$('.formSubmit').submit( function(){
var data = CKEDITOR.instances.editor1.getData();
$.ajax({
type: 'POST',
url: 'ck_bienban_1_luu.php',// url of phpcode save
data: {
data: data,
},
success: function() {
},
});
return(false);
}
);
Upvotes: 1