Moved some TinyMCE init code to make JS early init work
authorDan
Sun, 15 Jun 2008 01:29:30 -0400
changeset 572 c196e8f336b9
parent 571 66e14e61613e
child 573 43e7254afdb4
Moved some TinyMCE init code to make JS early init work
includes/clientside/static/editor.js
includes/clientside/static/enano-lib-basic.js
--- a/includes/clientside/static/editor.js	Sun Jun 15 00:59:37 2008 -0400
+++ b/includes/clientside/static/editor.js	Sun Jun 15 01:29:30 2008 -0400
@@ -43,6 +43,24 @@
 	debug : false
 };
 
+if ( !KILL_SWITCH && !DISABLE_MCE )
+{
+  if ( IE )
+  {
+    document.write('<script type="text/javascript" src="' + scriptPath + '/includes/clientside/tinymce/tiny_mce.js"></script>');
+  }
+  else
+  {
+    var script = document.createElement('script');
+    script.type="text/javascript";
+    script.src=scriptPath+"/includes/clientside/tinymce/tiny_mce_gzip.js";
+    script.onload = function(e)
+    {
+      tinyMCE_GZ.init(enano_tinymce_gz_options);
+    }
+    head.appendChild(script);
+  }
+}
 
 // Check tinyMCE to make sure its init is finished
 function tinymce_preinit_check()
@@ -53,6 +71,8 @@
     return false;
   if ( typeof(tinymce.DOM.get) != 'function' )
     return false;
+  if ( typeof(enano_tinymce_gz_options) != 'object' )
+    return false;
   return true;
 }
 
--- a/includes/clientside/static/enano-lib-basic.js	Sun Jun 15 00:59:37 2008 -0400
+++ b/includes/clientside/static/enano-lib-basic.js	Sun Jun 15 01:29:30 2008 -0400
@@ -260,24 +260,6 @@
 }
 
 var head = document.getElementsByTagName('head')[0];
-if ( !KILL_SWITCH && !DISABLE_MCE )
-{
-  if ( IE )
-  {
-    document.write('<script type="text/javascript" src="' + scriptPath + '/includes/clientside/tinymce/tiny_mce.js"></script>');
-  }
-  else
-  {
-    var script = document.createElement('script');
-    script.type="text/javascript";
-    script.src=scriptPath+"/includes/clientside/tinymce/tiny_mce_gzip.js";
-    script.onload = function(e)
-    {
-      tinyMCE_GZ.init(enano_tinymce_gz_options);
-    }
-    head.appendChild(script);
-  }
-}
 
 var script = document.createElement('script');
 script.type="text/javascript";