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
{
1227
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 8
if ( typeof(tinyMCE_GZ) == 'object' )
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 9
{
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 10
if ( !KILL_SWITCH && !DISABLE_MCE )
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 11
{
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 12
tinyMCE_GZ.init(enano_tinymce_gz_options, function()
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 13
{
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 14
tinyMCE.init(enano_tinymce_options);
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 15
});
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 16
tinymce_initted = true;
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 17
}
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 18
}
588
+ − 19
};
+ − 20
+ − 21
// editor options
582
+ − 22
if ( document.getElementById('mdgCss') )
+ − 23
{
1227
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 24
var css_url = document.getElementById('mdgCss').href;
582
+ − 25
}
+ − 26
else
+ − 27
{
1227
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 28
var css_url = scriptPath + '/includes/clientside/css/enano_shared.css';
582
+ − 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
1254
221d14331ebe
Added basic support for right-to-left languages. Set meta_direction to "rtl" in core.json.
Dan Fuhry <dan@enanocms.org>
diff
changeset
+ − 35
var html = document.getElementsByTagName('html')[0];
221d14331ebe
Added basic support for right-to-left languages. Set meta_direction to "rtl" in core.json.
Dan Fuhry <dan@enanocms.org>
diff
changeset
+ − 36
var direction = typeof(html.dir) != 'undefined' ? html.dir : 'ltr';
221d14331ebe
Added basic support for right-to-left languages. Set meta_direction to "rtl" in core.json.
Dan Fuhry <dan@enanocms.org>
diff
changeset
+ − 37
582
+ − 38
var enano_tinymce_options = {
1227
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 39
mode : "none",
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 40
plugins : 'table,save,safari,pagebreak,style,layer,advhr,insertdatetime,searchreplace,spellchecker,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount' + do_popups,
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 41
theme : 'advanced',
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 42
skin : _skin,
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 43
theme_advanced_resize_horizontal : false,
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 44
theme_advanced_resizing : true,
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 45
theme_advanced_toolbar_location : "top",
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 46
theme_advanced_toolbar_align : "left",
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 47
theme_advanced_buttons1 : "save,|,bold,italic,underline,strikethrough,|,spellchecker,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor,|,formatselect,|,fontselect,fontsizeselect",
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 48
theme_advanced_buttons3_add_before : "tablecontrols,separator",
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 49
theme_advanced_buttons3_add_after : "|,fullscreen",
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 50
theme_advanced_statusbar_location : 'bottom',
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 51
noneditable_noneditable_class : 'mce_readonly',
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 52
content_css : css_url,
1254
221d14331ebe
Added basic support for right-to-left languages. Set meta_direction to "rtl" in core.json.
Dan Fuhry <dan@enanocms.org>
diff
changeset
+ − 53
spellchecker_rpc_url : scriptPath + '/includes/clientside/tinymce/plugins/spellchecker/rpc.php',
221d14331ebe
Added basic support for right-to-left languages. Set meta_direction to "rtl" in core.json.
Dan Fuhry <dan@enanocms.org>
diff
changeset
+ − 54
directionality : direction
582
+ − 55
};
+ − 56
+ − 57
var enano_tinymce_gz_options = {
784
72df14a56a03
Added spell-checking support for TinyMCE on user request (see: http://forum.enanocms.org/topic/11/)
Dan
diff
changeset
+ − 58
plugins : 'table,save,safari,pagebreak,style,layer,advhr,insertdatetime,searchreplace,spellchecker,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras' + do_popups,
582
+ − 59
themes : 'advanced',
+ − 60
languages : 'en',
+ − 61
disk_cache : true,
+ − 62
debug : false
+ − 63
};
+ − 64
588
+ − 65
// load the script
+ − 66
582
+ − 67
if ( !KILL_SWITCH && !DISABLE_MCE )
+ − 68
{
1227
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 69
var uri = scriptPath + '/includes/clientside/tinymce/tiny_mce_gzip.js?327';
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 70
var sc = document.createElement('script');
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 71
sc.src = uri;
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 72
sc.type = 'text/javascript';
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 73
var head = document.getElementsByTagName('head')[0];
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
diff
changeset
+ − 74
head.appendChild(sc);
582
+ − 75
}