Download & Extend

No detach method in Drupal.behaviors.ckeditor

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

Status:active» fixed

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

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#3

Title:no detach in Drupal.behaviors.ckeditor» no detach method in Drupal.behaviors.ckeditor

#4

Title:no detach method in Drupal.behaviors.ckeditor» No detach method in Drupal.behaviors.ckeditor
nobody click here