--- wysiwyg.admin.inc	2008-12-01 15:32:41.000000000 +0100
+++ wysiwyg.admin_edit.inc	2009-02-08 20:57:31.000000000 +0100
@@ -171,6 +171,14 @@ function wysiwyg_profile_form($form_stat
     }
   }
 
+  // Add plugin settings to the form
+  $info = wysiwyg_get_editor($profile->editor);
+  if ($info['plugin config callback'] && function_exists($info['plugin config callback'])) {
+    $form['buttons']['plugin_settings'] = array();
+    $func = $info['plugin config callback'];
+    $func($form['buttons']['plugin_settings'], $profile);
+  }
+
   $form['appearance'] = array(
     '#type' => 'fieldset',
     '#title' => t('Editor appearance'),
@@ -320,6 +328,16 @@ function wysiwyg_profile_form($form_stat
  */
 function wysiwyg_profile_form_submit($form, &$form_state) {
   if (isset($form_state['values']['buttons'])) {
+
+    // Look for plugin specific configuration settings.
+    if (is_array($form_state['values']['buttons']['plugin_settings'])) {
+      foreach ($form_state['values']['buttons']['plugin_settings'] as $setting => $value) {
+        $form_state['values']['plugin_settings'][$setting] = $value;
+      }
+      // Unset it. Otherwise it would be stored as being a button.
+      unset($form_state['values']['buttons']['plugin_settings']);
+    }
+
     // Store only enabled buttons for each plugin.
     foreach ($form_state['values']['buttons'] as $plugin => $buttons) {
       $form_state['values']['buttons'][$plugin] = array_filter($form_state['values']['buttons'][$plugin]);
@@ -351,6 +369,11 @@ function wysiwyg_profile_form_submit($fo
 function theme_wysiwyg_admin_button_table(&$form) {
   $buttons = array();
 
+  if (isset($form['plugin_settings'])) {
+    $config = drupal_render($form['plugin_settings']);
+    unset($form['plugin_settings']);
+  }
+
   // Flatten forms array.
   foreach (element_children($form) as $name) {
     foreach (element_children($form[$name]) as $button) {
@@ -373,7 +396,7 @@ function theme_wysiwyg_admin_button_tabl
     $rows[] = $row;
   }
 
-  $output = theme('table', array(), $rows, array('width' => '100%'));
+  $output = theme('table', array(), $rows, array('width' => '100%')) . $config;
 
   return $output;
 }
