summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-05 10:19:44 +0000
committeralecpl <alec@alec.pl>2008-11-05 10:19:44 +0000
commitb8ae5093cc08fc7684aa087fb9dc1ce97fd49f5d (patch)
tree4ad25a02864948dbe803fe9588c4ca368c86dc06 /program/include/main.inc
parentda4e6095d6aa8c241f6f6a23c60f687bf9692309 (diff)
- Fix HTML editor initialization on IE (#1485304)
- move back toggle_editor function to editor.js - merge identity and compose editor init functions
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 21856bc80..bd5156509 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1173,4 +1173,22 @@ function rcmail_localize_foldername($name)
}
+/**
+ * Output HTML editor scripts
+ *
+ * @param boolean Editor mode (use true for minimal editor)
+ */
+function rcube_html_editor($mode='')
+{
+ global $OUTPUT, $CONFIG;
+
+ $lang = $tinylang = strtolower(substr($_SESSION['language'], 0, 2));
+ if (!file_exists(INSTALL_PATH . '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", "'.JQ($tinylang).'", '.intval($CONFIG['enable_spellcheck']).', "'.$mode.'");');
+}
+
?>