javascript - CKEDITOR is not working with promise call back -
employer_data = functiontogetemployer(); $.when(filldata()).then( function(status){ console.log("reaching here"); if(employer_data.detailsmessage !== null){ console.log("reaching here too"); ckeditor.instances.employer_detail_message.setdata(employer_data.detailsmessage); } } ) filldata: function(){ var dfd = jquery.deferred(); $.ajax({ // ajax call data. success: function(){ // dfd.resolve("resolved"); }, error: function(){ dfd.reject("rejected"); } }) return dfd.promise(); }
in above ckeditor setdata method not working.
if keep setdata method above promise setup works expected.
Comments
Post a Comment