CKeditor - Destroy instance
Hello
Does anyone here know anything about CKEditor?
I've got it installed on my site and it works great in FireFox and Chrome. But IE 9 is causing problems.
For some reason I can't destroy the CKEditor instance in IE 9. Following is my script:
- $("#ckSubmit").click(function(){
- // grab reply editor data
- var editor_data = CKEDITOR.instances.replyTxtarea.getData();
-
- // Push getActivityID and editor_data into array
- // getActivityID; is activityID variable from $(document).on('click','.details_button',function() {
- var postRply_Array = new Array();
- postRply_Array.push({activityID:getActivityID, replyTxt:editor_data});
-
- $.post("ol_postActivity.php",{postReply_Ary:postRply_Array},function(data){
- $.getJSON("ol_LogPosts.php", {actID:getActivityID}, function(data) {
- $('#postDiv').html(data);
- });
- $("#filterBy").val(1);
- });
- // set textarea data to empty, then destroy the ckeditor instance so it's completely cleared out.
- CKEDITOR.instances.replyTxtarea.setData('');
- CKEDITOR.instances.replyTxtarea.destroy();
-
- $("#replyTxtarea").hide();
- $(".postReplyBttn").show();
- $("#ckSubmit").removeClass('ol_shownTR').addClass("ol_hidden");
- });
Everything works great (in all browsers) accept line 18:
CKEDITOR.instances.replyTxtarea.destroy();
Does anyone have any idea what is going on? The line right before it uses basically the same syntax to setData(''); and empty the CKEDITOR instance. But - IE 9 is NOT destroying the instance.
OH - one other thing. In IE - the script stops executing at line 18 - because the following jQuery lines, hiding elements, do not execute.
Thanks in advance:
Pavilion