Index: fckeditor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/fckeditor.inc,v
retrieving revision 1.7
diff -u -r1.7 fckeditor.inc
--- fckeditor.inc	21 Jan 2009 15:49:31 -0000	1.7
+++ fckeditor.inc	22 Jan 2009 14:01:07 -0000
@@ -90,6 +90,8 @@
     'ToolbarStartExpanded' => TRUE,
     'EnterMode' => 'p',
     'ShiftEnterMode' => 'br',
+    'CustomConfigurationsPath' => wysiwyg_get_path('editors/js/fckeditor.config.js', TRUE),
+    'PluginsPath' => wysiwyg_get_path('plugins', TRUE),
     'LinkBrowser' => FALSE,
     'LinkUpload' => FALSE,
     'ImageBrowser' => FALSE,
@@ -118,6 +120,31 @@
       $init['EditorAreaCSS'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
     }
   }
+  
+  $dynamic_buttons = array();
+  $plugins = wysiwyg_get_plugins($editor['name']);
+  
+  if (!empty($config['buttons'])) {
+    foreach ($config['buttons'] as $plugin => $buttons) {
+      foreach ($buttons as $button => $enabled) {
+        // Iterate separately over buttons and extensions properties.
+        foreach (array('buttons', 'extensions') as $type) {
+          // Skip unavailable plugins.
+          if (!isset($plugins[$plugin][$type][$button])) {
+            continue;
+          }
+          // Add buttons.
+          if ($type == 'buttons') {
+            $dynamic_buttons[] = $button;
+          }
+        }
+      }
+    }
+    
+    if (!empty($dynamic_buttons)) {
+      $init['DynamicToolbar_buttons'] = implode(",", $dynamic_buttons);
+    }
+  }
 
   return $init;
 }
@@ -154,6 +181,26 @@
  */
 function wysiwyg_fckeditor_plugins($editor) {
   return array(
+    'default' => array(
+      'buttons' => array(
+        'Source' => t('Source'), 'DocProps' => t('DocProps'), 'Save' => t('Save'), 'NewPage' => t('NewPage'), 
+        'Preview' => t('Preview'), 'Templates' => t('Templates'), 'Cut' => t('Cut'), 'Copy' => t('Copy'), 
+        'Paste' => t('Paste'), 'PasteText' => t('PasteText'), 'PasteWord' => t('PasteWord'), 'Print' => t('Print'), 
+        'SpellCheck' => t('SpellCheck'), 'Undo' => t('Undo'), 'Redo' => t('Redo'), 'Find' => t('Find'), 
+        'Replace' => t('Replace'), 'SelectAll' => t('SelectAll'), 'RemoveFormat' => t('RemoveFormat'), 'Form' => t('Form'), 
+        'Checkbox' => t('Checkbox'), 'Radio' => t('Radio'), 'TextField' => t('TextField'), 'Textarea' => t('Textarea'), 
+        'Select' => t('Select'), 'Button' => t('Button'), 'ImageButton' => t('ImageButton'), 'HiddenField' => t('HiddenField'), 
+        'Bold' => t('Bold'), 'Italic' => t('Italic'), 'Underline' => t('Underline'), 'StrikeThrough' => t('StrikeThrough'), 
+        'Subscript' => t('Subscript'), 'Superscript' => t('Superscript'), 'OrderedList' => t('OrderedList'), 'UnorderedList' => t('UnorderedList'), 
+        'Outdent' => t('Outdent'), 'Indent' => t('Indent'), 'Blockquote' => t('Blockquote'), 'CreateDiv' => t('CreateDiv'), 
+        'JustifyLeft' => t('JustifyLeft'), 'JustifyCenter' => t('JustifyCenter'), 'JustifyRight' => t('JustifyRight'), 'JustifyFull' => t('JustifyFull'), 
+        'Link' => t('Link'), 'Unlink' => t('Unlink'), 'Anchor' => t('Anchor'), 'Image' => t('Image'), 
+        'Flash' => t('Flash'), 'Table' => t('Table'), 'Rule' => t('Rule'), 'Smiley' => t('Smiley'), 
+        'SpecialChar' => t('SpecialChar'), 'Style' => t('Style'), 'FontFormat' => t('FontFormat'), 
+        'FontName' => t('FontName'), 'FontSize' => t('FontSize'), 'TextColor' => t('TextColor'), 'BGColor' => t('BGColor'), 
+        'FitWindow' => t('FitWindow'), 'ShowBlocks' => t('ShowBlocks'), 'About' => t('About')),
+      'internal' => TRUE,
+    ),
   );
 }
 
Index: js/fckeditor-2.6.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/js/fckeditor-2.6.js,v
retrieving revision 1.9
diff -u -r1.9 fckeditor-2.6.js
--- js/fckeditor-2.6.js	21 Jan 2009 15:49:31 -0000	1.9
+++ js/fckeditor-2.6.js	22 Jan 2009 13:52:37 -0000
@@ -12,6 +12,12 @@
   for (var setting in settings) {
     FCKinstance.Config[setting] = settings[setting];
   }
+  if (FCKinstance.Config['DynamicToolbar_buttons']) {
+    FCKinstance.ToolbarSet = 'DynamicToolbar';
+  }
+  else {
+    FCKinstance.ToolbarSet = 'Wysiwyg';
+  }
   // Attach editor.
   FCKinstance.ReplaceTextarea();
 };
@@ -31,9 +37,5 @@
       delete FCKeditorAPI.__Instances[params.field];
     }
   }
-//  else {
-//    tinyMCE.triggerSave();
-//    tinyMCE.remove();
-//  }
 };
 

