Index: install_profile_wizard.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/install_profile_api/install_profile_wizard/install_profile_wizard.module,v
retrieving revision 1.13
diff -u -p -r1.13 install_profile_wizard.module
--- install_profile_wizard.module	27 Nov 2007 00:54:25 -0000	1.13
+++ install_profile_wizard.module	1 May 2008 20:15:29 -0000
@@ -140,8 +140,14 @@ function install_profile_wizard_form($fo
         '#default_value' => TRUE,
         '#weight' => 8,
     );
-    $form['nodes'] = array(
+    $form['export_tinymce'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Export TinyMCE profiles'),
+        '#default_value' => FALSE,
         '#weight' => 9,
+    );
+    $form['nodes'] = array(
+        '#weight' => 10,
         '#type' => 'fieldset',
         '#title' => t('Nodes to export'),
         '#collapsible' => TRUE,
@@ -163,13 +169,13 @@ function install_profile_wizard_form($fo
         '#type' => 'submit',
         '#submit' => TRUE,
         '#value' => t('Download'),
-        '#weight' => 10,
+        '#weight' => 11,
     );
     $form['display'] = array(
         '#type' => 'submit',
         '#submit' => TRUE,
         '#value' => t('Display'),
-        '#weight' => 10,
+        '#weight' => 11,
     );
 
     return $form;
@@ -364,6 +370,21 @@ include_once('../crud.inc');\n\n";
         $code .= "\n";
     }
 
+    // tinycme
+    if ($form_values['export_tinymce']) {
+      $query_result = db_query('SELECT name,settings FROM {tinymce_settings}');
+      $code .= "/************************************************************\n";
+      $code .= "*                          TinyMCE                          *\n";
+      $code .= "************************************************************/\n";
+      while ($tinyprofile = db_fetch_object($query_result)) {
+        $value = install_profile_wizard_serialize(unserialize($tinyprofile->settings), 4);
+        $code .= "    \$tinymce_settings = ". $value .";\n\n";
+        $code .= "    install_tinymce_create_profile(\$tinymce_settings['name'], \$tinymce_settings);\n";
+        $code .= "    install_tinymce_add_roles(\$tinymce_settings['name'], \$tinymce_settings['rids']);\n";
+      }
+    $code .= "\n";
+    }
+
     $code .= install_profile_wizard_export_nodes($form_values);
 
     $code .= "\n$postcode\n";
