diff --git a/fckeditor.utils.js b/fckeditor.utils.js index 2b3b93d..6d39fa6 100644 --- a/fckeditor.utils.js +++ b/fckeditor.utils.js @@ -14,7 +14,7 @@ Drupal.behaviors.fckeditor = function(context) { Drupal.behaviors.teaser(context); Drupal.behaviors.textarea(context); } - + $('textarea.fckeditor:not(.fckeditor-processed)', context).each(function() { var textarea = $(this).addClass('fckeditor-processed'); @@ -24,17 +24,17 @@ Drupal.behaviors.fckeditor = function(context) { if (editorInstance.defaultState == 1) { if (textarea.attr('class').indexOf("filterxss1") != -1 || textarea.attr('class').indexOf("filterxss2") != -1) { - if (typeof Drupal.settings.fckeditor.settings[taid].input_format == 'undefined') { + if (typeof editorInstance.input_format == 'undefined') { // 0 == FILTER_FORMAT_DEFAULT - Drupal.settings.fckeditor.settings[taid].input_format = 0; + editorInstance.input_format = 0; } - else if (typeof Drupal.settings.fckeditor.settings[taid].input_format == 'object') { - Drupal.settings.fckeditor.settings[taid].input_format = Drupal.settings.fckeditor.settings[taid].input_format.pop(); + else if (typeof editorInstance.input_format == 'object') { + editorInstance.input_format = editorInstance.input_format.pop(); } $.post(Drupal.settings.basePath + 'index.php?q=fckeditor/xss', { 'text': $('#' + taid).val(), 'token': Drupal.settings.fckeditor.ajaxToken, - 'input_format': Drupal.settings.fckeditor.settings[taid].input_format + 'input_format': editorInstance.input_format }, function(text) { textarea.val(text);