| 1 | ./program/include/main.inc.php#line1374 |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * Output HTML editor scripts |
|---|
| 5 | * |
|---|
| 6 | * @param string Editor mode |
|---|
| 7 | */ |
|---|
| 8 | function rcube_html_editor($mode='') |
|---|
| 9 | { |
|---|
| 10 | global $RCMAIL, $OUTPUT, $CONFIG; |
|---|
| 11 | |
|---|
| 12 | $lang = $tinylang = strtolower(substr($_SESSION['language'], 0, 2)); |
|---|
| 13 | if (!file_exists(INSTALL_PATH . 'program/js/tiny_mce/langs/'.$tinylang.'.js')) |
|---|
| 14 | $tinylang = 'en'; |
|---|
| 15 | |
|---|
| 16 | $hook = $RCMAIL->plugins->exec_hook('hmtl_editor', array('abort' => false, 'mode' => $mode, 'tinylang' => $tinylang)); |
|---|
| 17 | |
|---|
| 18 | if($hook['abort']) |
|---|
| 19 | return; |
|---|
| 20 | |
|---|
| 21 | $OUTPUT->include_script('tiny_mce/tiny_mce.js'); |
|---|
| 22 | $OUTPUT->include_script('editor.js'); |
|---|
| 23 | $OUTPUT->add_script('rcmail_editor_init("$__skin_path", "'.JQ($tinylang).'", '.intval($CONFIG['enable_spellcheck']).', "'.$mode.'");'); |
|---|
| 24 | } |
|---|
| 25 | |
|---|