Index: editors/ckeditor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/ckeditor.inc,v
retrieving revision 1.3
diff -u -p -r1.3 ckeditor.inc
--- editors/ckeditor.inc	20 Oct 2009 02:46:59 -0000	1.3
+++ editors/ckeditor.inc	21 Oct 2009 05:20:53 -0000
@@ -41,7 +41,7 @@ function wysiwyg_ckeditor_editor() {
     ),
     'proxy plugin settings callback' => 'wysiwyg_ckeditor_proxy_plugin_settings',
     'versions' => array(
-      '3.0.3665' => array(
+      '3.0.0.3665' => array(
         'js files' => array('ckeditor-3.0.js'),
       ),
     ),
@@ -65,8 +65,11 @@ function wysiwyg_ckeditor_version($edito
   while ($max_lines && $line = fgets($library, 140)) {
     // version:'CKEditor 3.0 SVN',revision:'3665'
     // version:'3.0 RC',revision:'3753'
+    // version:'3.0.1',revision:'4391'
     if (preg_match('@version:\'(?:CKEditor )?([\d\.]+)(?:.+revision:\'([\d]+))?@', $line, $version)) {
       fclose($library);
+      // Version numbers need to have three parts since 3.0.1.
+      $version[1] = preg_replace('/^(\d+)\.(\d+)$/', '${1}.${2}.0', $version[1]);
       return $version[1] . '.' . $version[2];
     }
     $max_lines--;
@@ -140,12 +143,22 @@ function wysiwyg_ckeditor_settings($edit
   }
 
   if (isset($config['css_setting'])) {
-    if ($config['css_setting'] == 'theme') {
-      // CKeditor only supports one CSS file currently.
-      $settings['contentsCss'] = reset(wysiwyg_get_css());
+    // Versions below 3.0.1 could only handle one stylesheet.
+    if (version_compare($editor['installed version'], '3.0.1.4391', '<')) {
+      if ($config['css_setting'] == 'theme') {
+        $settings['contentsCss'] = reset(wysiwyg_get_css());
+      }
+      elseif ($config['css_setting'] == 'self' && isset($config['css_path'])) {
+        $settings['contentsCss'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
+      }
     }
-    elseif ($config['css_setting'] == 'self' && isset($config['css_path'])) {
-      $settings['contentsCss'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
+    else {
+      if ($config['css_setting'] == 'theme') {
+        $settings['contentsCss'] = wysiwyg_get_css();
+      }
+      elseif ($config['css_setting'] == 'self' && isset($config['css_path'])) {
+        $settings['contentsCss'] = explode(',', strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme())));
+      }
     }
   }
 
Index: editors/js/ckeditor-3.0.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/js/ckeditor-3.0.js,v
retrieving revision 1.3
diff -u -p -r1.3 ckeditor-3.0.js
--- editors/js/ckeditor-3.0.js	20 Oct 2009 02:46:59 -0000	1.3
+++ editors/js/ckeditor-3.0.js	21 Oct 2009 05:20:53 -0000
@@ -95,12 +95,13 @@ Drupal.wysiwyg.editor.attach.ckeditor = 
         editor.dataProcessor.toDataFormat = CKEDITOR.tools.override(editor.dataProcessor.toDataFormat, function(originalToDataFormat) {
           // Convert WYSIWYG mode content to raw data.
           return function(data, fixForBody) {
+            data = originalToDataFormat.call(this, data, fixForBody);
             for (var plugin in Drupal.settings.wysiwyg.plugins[params.format].drupal) {
               if (typeof Drupal.wysiwyg.plugins[plugin].detach == 'function') {
                 data = Drupal.wysiwyg.plugins[plugin].detach(data, Drupal.settings.wysiwyg.plugins.drupal[plugin], editor.name);
               }
             }
-            return originalToDataFormat.call(this, data, fixForBody);
+            return data;
           };
         });
   		}
