summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt3
-rw-r--r--fckeditor.module6
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 5cf62fd..ff2986b 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,5 +1,8 @@
$Id$
+-- 2008-09-04 version 6.x-1.x-dev
+* #303863 Fixed: "Show disable/enable rich text editor toggle" value was ignored from user settings.
+
-- 2008-08-27 version 5.x-2.x-dev
* #270430 Fixed: Compatibility with themes that put all javascript at the bottom
diff --git a/fckeditor.module b/fckeditor.module
index 63d8796..ed63b2d 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -689,13 +689,13 @@ function fckeditor_process_textarea($element) {
$wysiwyg_link .= "<a href=\"javascript:Toggle('{$js_id}','{$element['#id']}','". str_replace("'", "\\'", t("Switch to plain text editor")) ."','". str_replace("'", "\\'", t("Switch to rich text editor")) ."');\" id=\"switch_{$js_id}\" ". ($fckeditor_on?"style=\"display:none\"":"") .">";
$wysiwyg_link .= $fckeditor_on ? t("Switch to plain text editor") : t("Switch to rich text editor");
$wysiwyg_link .= "</a>";
- drupal_add_js('if (Drupal.jsEnabled) {$(document).ready(function() {CreateToggle("'.$element['#id'].'","'.$js_id.'", '.$fckeditor_on.');});}', 'inline');
if (!isset($element['#suffix'])) {
$element['#suffix'] = "";
}
//settings are saved as strings, not booleans
- if ($profile->settings['show_toggle'] == 't') {
+ if ($conf['show_toggle'] == 't') {
// Make sure to append to #suffix so it isn't completely overwritten
+ drupal_add_js('if (Drupal.jsEnabled) {$(document).ready(function() {CreateToggle("'.$element['#id'].'","'.$js_id.'", '.$fckeditor_on.');});}', 'inline');
$element['#suffix'] .= $wysiwyg_link;
}
// setting some variables
@@ -732,7 +732,7 @@ function fckeditor_process_textarea($element) {
$toolbar = FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME;
}
- $textarea_id = $profile->settings['show_toggle'] == 't' ? $js_id : $element['#id'];
+ $textarea_id = $conf['show_toggle'] == 't' ? $js_id : $element['#id'];
$js = $js_id ." = new FCKeditor( '". $textarea_id ."' );
". $js_id .".BasePath = '". $module_full_path ."/fckeditor/';