Posted by Cyberwolf on February 8, 2011 at 7:13am
4 followers
Jump to:
| Project: | CKEditor - WYSIWYG HTML editor |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | #d7ux, ckeditor-7.x, D7 |
Issue Summary
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
#1
Detach method was added yesterday to DEV version... I add some things from your patch.
I commit it to CVS. Really thx for patch.
Greetings
#2
Automatically closed -- issue fixed for 2 weeks with no activity.
#3
#4