summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/include/rcmail.php6
-rw-r--r--program/js/app.js5
2 files changed, 8 insertions, 3 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 1da2f8f91..2f595deef 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1805,17 +1805,17 @@ class rcmail extends rcube
$lang = 'en';
}
- $script = json_encode(array(
+ $script = array(
'mode' => $mode,
'lang' => $lang,
'skin_path' => $this->output->get_skin_path(),
'spellcheck' => intval($this->config->get('enable_spellcheck')),
'spelldict' => intval($this->config->get('spellcheck_dictionary'))
- ));
+ );
$this->output->include_script('tiny_mce/tiny_mce.js');
$this->output->include_script('editor.js');
- $this->output->add_script("rcmail_editor_init($script)", 'docready');
+ $this->output->set_env('html_editor_init', $script);
}
/**
diff --git a/program/js/app.js b/program/js/app.js
index 8469dc81a..e6b1d84a1 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -187,6 +187,11 @@ function rcube_webmail()
if (this.env.permaurl)
this.enable_command('permaurl', 'extwin', true);
+ // initialize html editor
+ if (this.env.html_editor_init && window.rcmail_editor_init) {
+ rcmail_editor_init(this.env.html_editor_init);
+ }
+
switch (this.task) {
case 'mail':