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