Gaurav_0093
Gaurav_0093

Reputation: 1030

How to get the save Event in ckeditor editor?

How to get the save event in ckeditor so I can make ajax call to save the data.

Here I upload image enter image description here

Upvotes: 1

Views: 2383

Answers (1)

Kevin Luong
Kevin Luong

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

Related Questions