- $tinylang = substr($_SESSION['language'], 0, 2);
- if (!file_exists('program/js/tiny_mce/langs/'.$tinylang.'.js'))
- {
- $tinylang = 'en';
- }
-
- $OUTPUT->include_script('tiny_mce/tiny_mce.js');
- $OUTPUT->add_script("tinyMCE.init({ mode : 'textareas'," .
- "editor_selector : 'mce_editor'," .
- "apply_source_formatting : true," .
- "language : '$tinylang'," .
- "content_css : '\$__skin_path' + '/editor_content.css'," .
- "theme : 'advanced'," .
- "theme_advanced_toolbar_location : 'top'," .
- "theme_advanced_toolbar_align : 'left'," .
- "theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr'," .
- "theme_advanced_buttons2 : 'link,unlink,code,forecolor,fontselect,fontsizeselect'," .
- "theme_advanced_buttons3 : '' });");
-
- if (!$IDENTITY_RECORD && $RCMAIL->action != 'add-identity')
- return rcube_label('notfound');