? tinymce
Index: plugin_reg.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tinymce/plugin_reg.php,v
retrieving revision 1.2
diff -u -r1.2 plugin_reg.php
--- plugin_reg.php	21 Sep 2005 05:17:10 -0000	1.2
+++ plugin_reg.php	28 Nov 2005 16:37:56 -0000
@@ -22,10 +22,10 @@
 
 $plugins['advhr'] = array();
 $plugins['advhr']['theme_advanced_buttons3']  = array('advhr');
-$plugins['advhr']['extended_valid_elements']      = array('hr[class|width|size|noshade]');
+$plugins['advhr']['extended_valid_elements']  = array('hr[class|width|size|noshade]');
 
 $plugins['advimage'] = array();
-$plugins['advimg']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]');
+$plugins['advimage']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]');
 
 $plugins['advlink'] = array();
 $plugins['advlink']['extended_valid_elements'] = array('a[name|href|target|title|onclick]');
@@ -51,7 +51,7 @@
 // Note this isn't a true plugin, rather it's buttons made available by the advanced theme.
 $plugins['font'] = array();
 $plugins['font']['theme_advanced_buttons1'] = array('fontselect', 'fontsizeselect');
-$plugins['font']['extended_valid_elements']     = array('font[face|size|color|style],span[class|align|style]');
+$plugins['font']['extended_valid_elements'] = array('font[face|size|color|style],span[class|align|style]');
 
 $plugins['fullscreen'] = array();
 $plugins['fullscreen']['theme_advanced_buttons3'] = array('fullscreen');
Index: tinymce.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tinymce/tinymce.module,v
retrieving revision 1.43
diff -u -r1.43 tinymce.module
--- tinymce.module	25 Nov 2005 18:09:32 -0000	1.43
+++ tinymce.module	28 Nov 2005 20:21:04 -0000
@@ -505,6 +505,10 @@
             }
           }
         }
+        // Some advanced plugins only have an $rname and no buttons
+        if ($settings['buttons'][$rname]) {
+          if (!in_array($rname, $plugin_tracker)) $plugin_tracker[] = $rname;
+        }
       }
 
       // Add the rest of the TinyMCE config options to the $init array for each button.
@@ -512,7 +516,12 @@
         foreach ($plugin_tracker as $pname) {
           if ($pname != 'default') $init['plugins'][] = $pname;
           foreach ($plugins[$pname] as $mce_key => $mce_value) {
-            if (!strstr($mce_key, 'theme_advanced_buttons')) {
+            // Don't overwrite buttons or extended_valid_elements
+            if ($mce_key == 'extended_valid_elements') {
+              // $mce_value is an array for extended_valid_elements so just grab the first element in the array (never more than one)
+              $init[$mce_key][] = $mce_value[0];
+            }
+            else if (!strstr($mce_key, 'theme_advanced_buttons')) {
               $init[$mce_key] = $mce_value;
             }
           }
@@ -608,7 +617,7 @@
   $form['basic']['access'] = array('#type' => 'radios', '#title' => t('Make tinymce visible on'), '#default_value' => $edit->settings['access'], '#options' => array(t('all pages'), t('specific pages')));
   $form['basic']['access_pages'] = array('#type' => 'textarea', '#title' => t('Specific pages'), '#default_value' => $edit->settings['access_pages'] ? $edit->settings['access_pages'] : tinymce_help('admin/settings/tinymce#pages'), '#cols' => 40, '#rows' => 5, '#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '<em>blog</em>' for the blog page and '<em>blog/*</em>' for every personal blog. '<em>&lt;front&gt;</em>' is the front page."));
 
-  $form['buttons'] = array('#type' => 'fieldset', '#title' => t('Buttons'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#tree' => TRUE, '#theme' => 'tinymce_profile_form_buttons');
+  $form['buttons'] = array('#type' => 'fieldset', '#title' => t('Buttons &amp; Plugins'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#tree' => TRUE, '#theme' => 'tinymce_profile_form_buttons');
   
   $metadata = _tinymce_get_buttons(FALSE);
   // Generate the button list.
