includes/clientside/static/editor.js
changeset 461 717e71109645
parent 420 301f546688d1
child 473 518bc2b214f1
equal deleted inserted replaced
460:3a1c99845ca8 461:717e71109645
    32   theme_advanced_statusbar_location : 'bottom',
    32   theme_advanced_statusbar_location : 'bottom',
    33   noneditable_noneditable_class : 'mce_readonly',
    33   noneditable_noneditable_class : 'mce_readonly',
    34   content_css : css_url
    34   content_css : css_url
    35 };
    35 };
    36 
    36 
       
    37 // Check tinyMCE to make sure its init is finished
       
    38 function tinymce_init_check()
       
    39 {
       
    40   if ( typeof(tinyMCE.init) != 'function' )
       
    41     return false;
       
    42   if ( typeof(tinymce.DOM) != 'object' )
       
    43     return false;
       
    44   if ( typeof(tinymce.DOM.get) != 'function' )
       
    45     return false;
       
    46   return true;
       
    47 }
       
    48 
    37 var initTinyMCE = function(e)
    49 var initTinyMCE = function(e)
    38 {
    50 {
    39   if ( typeof(tinyMCE) == 'object' )
    51   if ( typeof(tinyMCE) == 'object' )
    40   {
    52   {
    41     if ( !KILL_SWITCH && !DISABLE_MCE )
    53     if ( !KILL_SWITCH && !DISABLE_MCE )
    42     {
    54     {
       
    55       if ( !tinymce_init_check() )
       
    56       {
       
    57         setTimeout('initTinyMCE();', 200);
       
    58         return false;
       
    59       }
    43       tinyMCE.init(enano_tinymce_options);
    60       tinyMCE.init(enano_tinymce_options);
    44     }
    61     }
    45   }
    62   }
    46 }
    63 }
    47 addOnloadHook(initTinyMCE);
    64 addOnloadHook(initTinyMCE);