Index: tinymce.module =================================================================== --- tinymce.module (revision 424) +++ tinymce.module (working copy) @@ -137,7 +137,7 @@ $enable = t('enable rich-text'); $disable = t('disable rich-text'); - + $tinymce_invoke = <<$no_wysiwyg'); + } else { + //document.write("
$link_text
"); + $('#edit-$textarea_name').after("
$link_text
"); } - else { - document.write("
$link_text
"); - } EOD; @@ -244,7 +243,12 @@ } // Load a TinyMCE init for each textarea. if ($init) drupal_add_js($tinymce_invoke, 'inline'); - + + //settings are saved as strings, not booleans + if ($profile->settings['show_toggle'] == 'true') { + // Make sure to append to #suffix so it isn't completely overwritten + $element['#suffix'] .= $wysiwyg_link; + } // Set resizable to false to avoid drupal.js resizable function from taking control of the textarea $element['#resizable'] = FALSE; }