Index: wysiwyg_editor.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/wysiwyg_editor.js,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 wysiwyg_editor.js
--- wysiwyg_editor.js	8 Jul 2008 02:54:34 -0000	1.1.2.6
+++ wysiwyg_editor.js	12 Jul 2008 22:58:16 -0000
@@ -1,6 +1,12 @@
 // $Id: wysiwyg_editor.js,v 1.1.2.6 2008/07/08 02:54:34 sun Exp $
 
 /**
+ * If TinyMCE gzip compression is enabled, TinyMCE must be initialized with
+ * a different object.
+ */
+Drupal.wysiwygEditor = (Drupal.settings.wysiwygEditor.execMode == 'gzip' ? tinyMCE_GZ : tinyMCE);
+
+/**
  * Initialize each Wysiwyg Editor configuration.
  *
  * This function needs to be called before the page is fully loaded, as
@@ -9,18 +15,27 @@
 Drupal.wysiwygEditorInit = function () {
   // If JS compression is enabled, TinyMCE is unable to find its own base path
   // and exec mode, hence we need to define it manually.
-  tinyMCE.baseURL = Drupal.settings.wysiwygEditor.editorBasePath;
-  tinyMCE.srcMode = (Drupal.settings.wysiwygEditor.execMode == 'src' ? '_src' : '');
-  tinyMCE.gzipMode = (Drupal.settings.wysiwygEditor.execMode == 'gzip');
+  Drupal.wysiwygEditor.baseURL = Drupal.settings.wysiwygEditor.editorBasePath;
+  Drupal.wysiwygEditor.srcMode = (Drupal.settings.wysiwygEditor.execMode == 'src' ? '_src' : '');
+  Drupal.wysiwygEditor.gzipMode = (Drupal.settings.wysiwygEditor.execMode == 'gzip');
 
   for (var theme in Drupal.settings.wysiwygEditor.configs) {
     // Clone so we are not passing by reference. Otherwise the
     // settings will get overwritten.
     var config = Drupal.wysiwygEditorCloneObject(Drupal.settings.wysiwygEditor.configs[theme]);
-    tinyMCE.init(config);
+    Drupal.wysiwygEditor.init(config);
+  }
+  Drupal.wysiwygEditorLoadPlugins();
+}
+
+Drupal.wysiwygEditorLoadPlugins = function () {
+  if (Drupal.wysiwygEditor.loaded) {
+    for (var plugin in Drupal.settings.wysiwygEditor.plugins) {
+      tinyMCE.loadPlugin(plugin, Drupal.settings.wysiwygEditor.plugins[plugin]);
+    }
   }
-  for (var plugin in Drupal.settings.wysiwygEditor.plugins) {
-    tinyMCE.loadPlugin(plugin, Drupal.settings.wysiwygEditor.plugins[plugin]);
+  else {
+  	window.setTimeout(Drupal.wysiwygEditorLoadPlugins, 100);
   }
 }
 
Index: wysiwyg_editor.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/wysiwyg_editor.module,v
retrieving revision 1.1.2.16
diff -u -p -r1.1.2.16 wysiwyg_editor.module
--- wysiwyg_editor.module	8 Jul 2008 02:54:34 -0000	1.1.2.16
+++ wysiwyg_editor.module	12 Jul 2008 22:59:46 -0000
@@ -206,6 +206,7 @@ function wysiwyg_editor_load_config($the
         $config[$key] = implode(',', $config[$key]);
       }
     }
+    $config['invalid_elements'] = '';
     drupal_add_js('Drupal.settings.wysiwygEditor.configs["'. $theme .'"] = '. drupal_to_js($config) .';', 'inline');
     $themes[] = $theme;
   }
