includes/clientside/static/tinymce-init.js
changeset 1227 bdac73ed481e
parent 1193 e3b94bd055dc
child 1254 221d14331ebe
equal deleted inserted replaced
1226:de56132c008d 1227:bdac73ed481e
     3 //
     3 //
     4 
     4 
     5 // Check tinyMCE to make sure its init is finished
     5 // Check tinyMCE to make sure its init is finished
     6 var initTinyMCE = function(e)
     6 var initTinyMCE = function(e)
     7 {
     7 {
     8   if ( typeof(tinyMCE_GZ) == 'object' )
     8 	if ( typeof(tinyMCE_GZ) == 'object' )
     9   {
     9 	{
    10     if ( !KILL_SWITCH && !DISABLE_MCE )
    10 		if ( !KILL_SWITCH && !DISABLE_MCE )
    11     {
    11 		{
    12       tinyMCE_GZ.init(enano_tinymce_gz_options, function()
    12 			tinyMCE_GZ.init(enano_tinymce_gz_options, function()
    13         {
    13 				{
    14           tinyMCE.init(enano_tinymce_options);
    14 					tinyMCE.init(enano_tinymce_options);
    15         });
    15 				});
    16       tinymce_initted = true;
    16 			tinymce_initted = true;
    17     }
    17 		}
    18   }
    18 	}
    19 };
    19 };
    20 
    20 
    21 // editor options
    21 // editor options
    22 if ( document.getElementById('mdgCss') )
    22 if ( document.getElementById('mdgCss') )
    23 {
    23 {
    24   var css_url = document.getElementById('mdgCss').href;
    24 	var css_url = document.getElementById('mdgCss').href;
    25 }
    25 }
    26 else
    26 else
    27 {
    27 {
    28   var css_url = scriptPath + '/includes/clientside/css/enano_shared.css';
    28 	var css_url = scriptPath + '/includes/clientside/css/enano_shared.css';
    29 }
    29 }
    30 
    30 
    31 var do_popups = ( is_Safari ) ? '' : ',inlinepopups';
    31 var do_popups = ( is_Safari ) ? '' : ',inlinepopups';
    32 var _skin = ( typeof(tinymce_skin) == 'string' ) ? tinymce_skin : 'default';
    32 var _skin = ( typeof(tinymce_skin) == 'string' ) ? tinymce_skin : 'default';
    33 var tinymce_initted = false;
    33 var tinymce_initted = false;
    34 
    34 
    35 var enano_tinymce_options = {
    35 var enano_tinymce_options = {
    36   mode : "none",
    36 	mode : "none",
    37   plugins : 'table,save,safari,pagebreak,style,layer,advhr,insertdatetime,searchreplace,spellchecker,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount' + do_popups,
    37 	plugins : 'table,save,safari,pagebreak,style,layer,advhr,insertdatetime,searchreplace,spellchecker,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount' + do_popups,
    38   theme : 'advanced',
    38 	theme : 'advanced',
    39   skin : _skin,
    39 	skin : _skin,
    40   theme_advanced_resize_horizontal : false,
    40 	theme_advanced_resize_horizontal : false,
    41   theme_advanced_resizing : true,
    41 	theme_advanced_resizing : true,
    42   theme_advanced_toolbar_location : "top",
    42 	theme_advanced_toolbar_location : "top",
    43   theme_advanced_toolbar_align : "left",
    43 	theme_advanced_toolbar_align : "left",
    44   theme_advanced_buttons1 : "save,|,bold,italic,underline,strikethrough,|,spellchecker,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor,|,formatselect,|,fontselect,fontsizeselect",
    44 	theme_advanced_buttons1 : "save,|,bold,italic,underline,strikethrough,|,spellchecker,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor,|,formatselect,|,fontselect,fontsizeselect",
    45   theme_advanced_buttons3_add_before : "tablecontrols,separator",
    45 	theme_advanced_buttons3_add_before : "tablecontrols,separator",
    46   theme_advanced_buttons3_add_after : "|,fullscreen",
    46 	theme_advanced_buttons3_add_after : "|,fullscreen",
    47   theme_advanced_statusbar_location : 'bottom',
    47 	theme_advanced_statusbar_location : 'bottom',
    48   noneditable_noneditable_class : 'mce_readonly',
    48 	noneditable_noneditable_class : 'mce_readonly',
    49   content_css : css_url,
    49 	content_css : css_url,
    50   spellchecker_rpc_url : scriptPath + '/includes/clientside/tinymce/plugins/spellchecker/rpc.php'
    50 	spellchecker_rpc_url : scriptPath + '/includes/clientside/tinymce/plugins/spellchecker/rpc.php'
    51 };
    51 };
    52 
    52 
    53 var enano_tinymce_gz_options = {
    53 var enano_tinymce_gz_options = {
    54 	plugins : 'table,save,safari,pagebreak,style,layer,advhr,insertdatetime,searchreplace,spellchecker,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras' + do_popups,
    54 	plugins : 'table,save,safari,pagebreak,style,layer,advhr,insertdatetime,searchreplace,spellchecker,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras' + do_popups,
    55 	themes : 'advanced',
    55 	themes : 'advanced',
    60 
    60 
    61 // load the script
    61 // load the script
    62 
    62 
    63 if ( !KILL_SWITCH && !DISABLE_MCE )
    63 if ( !KILL_SWITCH && !DISABLE_MCE )
    64 {
    64 {
    65   var uri = scriptPath + '/includes/clientside/tinymce/tiny_mce_gzip.js?327';
    65 	var uri = scriptPath + '/includes/clientside/tinymce/tiny_mce_gzip.js?327';
    66   var sc = document.createElement('script');
    66 	var sc = document.createElement('script');
    67   sc.src = uri;
    67 	sc.src = uri;
    68   sc.type = 'text/javascript';
    68 	sc.type = 'text/javascript';
    69   var head = document.getElementsByTagName('head')[0];
    69 	var head = document.getElementsByTagName('head')[0];
    70   head.appendChild(sc);
    70 	head.appendChild(sc);
    71 }
    71 }