added language support to HTML editing (#1484862)
1 files deleted
3 files modified
| | |
| | | ---------- |
| | | - HTML editing is now working with PHP5 updates and TinyMCE v3.0.6 |
| | | - fix signature loading on Windows (#1484545) |
| | | - add language support to HTML editing (#1484862) |
| | | |
| | | 2008/04/15 (alec) |
| | | ---------- |
| | |
| | | |
| | | // Initialize the message editor |
| | | |
| | | function rcmail_editor_init(skin_path) |
| | | function rcmail_editor_init(skin_path, editor_lang) |
| | | { |
| | | tinyMCE.init({ mode : "textareas", |
| | | editor_selector : "mce_editor", |
| | | accessibility_focus : false, |
| | | apply_source_formatting : true, |
| | | theme : "advanced", |
| | | plugins : "emotions,media,nonbreaking,table,searchreplace,spellchecker,visualchars", |
| | | theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,link,unlink,emotions,charmap,code,forecolor,backcolor,fontselect,fontsizeselect, separator,undo,redo,image,media,spellchecker", |
| | | language : editor_lang, |
| | | plugins : "emotions,media,nonbreaking,table,searchreplace,visualchars,directionality", |
| | | theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,link,unlink,emotions,charmap,code,forecolor,backcolor,fontselect,fontsizeselect, separator,undo,redo,image,media,ltr,rtl", |
| | | theme_advanced_buttons2 : "", |
| | | theme_advanced_buttons3 : "", |
| | | theme_advanced_toolbar_location : "top", |
| | |
| | | $body = rcmail_create_draft_body($body, $isHtml); |
| | | } |
| | | |
| | | $tinylang = substr($_SESSION['user_lang'], 0, 2); |
| | | if (!file_exists('program/js/tiny_mce/langs/'.$tinylang.'.js')) |
| | | { |
| | | $tinylang = 'en'; |
| | | } |
| | | |
| | | $OUTPUT->include_script('tiny_mce/tiny_mce.js'); |
| | | $OUTPUT->include_script("editor.js"); |
| | | $OUTPUT->add_script('rcmail_editor_init("$__skin_path");'); |
| | | $OUTPUT->add_script('rcmail_editor_init("$__skin_path", "'.$tinylang.'");'); |
| | | |
| | | $out = $form_start ? "$form_start\n" : ''; |
| | | |