From e3ae2d7efdeadc41067c502e47e30e2261ac2540 Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 22 Mar 2012 13:45:08 +0100 Subject: [PATCH] [#1491210] by michal_cksource: CKEditor gets disabled/enabled on all AJAX calls --- includes/ckeditor.utils.js | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/ckeditor.utils.js b/includes/ckeditor.utils.js index 0943525..bc1df0c 100644 --- a/includes/ckeditor.utils.js +++ b/includes/ckeditor.utils.js @@ -270,13 +270,16 @@ window.CKEDITOR_BASEPATH = Drupal.settings.ckeditor.editor_path; }); }, detach: - function(context){ + function(context, settings, trigger){ $(context).find("textarea.ckeditor-mod.ckeditor-processed").each(function () { - var ta_id=$(this).attr("id"); - if (CKEDITOR.instances[ta_id]) - $('#'+ta_id).val(CKEDITOR.instances[ta_id].getData()); + var ta_id=$(this).attr("id"); + if (CKEDITOR.instances[ta_id]) + $('#'+ta_id).val(CKEDITOR.instances[ta_id].getData()); + if(trigger != 'serialize') { Drupal.ckeditorOff(ta_id); - }).removeClass('ckeditor-processed'); + $(this).removeClass('ckeditor-processed'); + } + }); } }; })(jQuery); -- 1.7.4.msysgit.0