In our application we are loading a ckeditor-enabled #text_format field with ajax. However, the Drupal.behaviors.ckeditor behavior has no detach method, causing some errors in the vain of "i.contentWindow is not defined' when subsequently reloading the field with the same id.
I added this detach method, which seems to solve the issues we encountered so far:
detach:
function (context) {
$("textarea.ckeditor-mod.ckeditor-processed").each(function () {
var ta_id=$(this).attr("id");
Drupal.ckeditorOff(ta_id);
}).removeClass('ckeditor-processed');
}
Comments
Comment #1
dczepierga commentedDetach method was added yesterday to DEV version... I add some things from your patch.
I commit it to CVS. Really thx for patch.
Greetings
Comment #3
mkesicki commentedComment #4
mkesicki commented