summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWiktor Walc2008-09-04 13:06:02 (GMT)
committer Wiktor Walc2008-09-04 13:06:02 (GMT)
commite24323c51465da380178b1e1677c4de217e688ac (patch)
tree2cd4ac7ce9e9ed8b3404f196af2537b2029b7680
parentce3861a639a6ea8346b25ec79f5315c6159a7c0a (diff)
yet another attempt to fix #290831
-rw-r--r--fckeditor.module9
-rw-r--r--fckeditor.utils.js3
2 files changed, 5 insertions, 7 deletions
diff --git a/fckeditor.module b/fckeditor.module
index 89d6969..403efc7 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -650,11 +650,6 @@ function fckeditor_process_textarea($element) {
return $element;
break;
}
-
- //this element will be sent again, so let's skip it now
- if (!empty($element['#post']) && !empty($element['#needs_validation'])) {
- return $element;
- }
if (isset($element['#attributes']['disabled']) && $element['#attributes']['disabled'] == 'disabled') {
return $element;
@@ -900,8 +895,8 @@ function fckeditor_process_textarea($element) {
drupal_add_js('if (Drupal.jsEnabled) {$(document).ready(function() {if (typeof ('. $js_id .') != "undefined") {
if ($("#edit-teaser-js").size() && $("#edit-teaser-js").val().length){
$("#edit-body").val($("#edit-teaser-js").val() + "<!--break-->" + $("#edit-body").val());
- }
- window.setTimeout("'. $js_id .'.ReplaceTextarea()",100);}});}', 'inline', 'footer');
+ }
+ window.setTimeout("if(document.getElementById(\"'. $textarea_id .'\")) '. $js_id .'.ReplaceTextarea();",100);}});}', 'inline', 'footer');
}
}
}
diff --git a/fckeditor.utils.js b/fckeditor.utils.js
index 7dd1649..5104347 100644
--- a/fckeditor.utils.js
+++ b/fckeditor.utils.js
@@ -127,6 +127,9 @@ function CreateToggle(elId, jsId, fckeditorOn)
var ta = document.getElementById(elId);
var ta2 = document.getElementById('fck_' + jsId);
+ if (!ta || !ta2)
+ return;
+
ta2.value = ta.value;
ta.parentNode.insertBefore(ta2, ta);
if (fckeditorOn)