From 646b64107a578d228a23d5b82923fb794fdb9c55 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 30 May 2014 02:32:06 -0400
Subject: [PATCH] Implemented Text Editor widget that integrates all operations on textareas including HTML editor and spellchecking

---
 program/include/rcmail.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 7a952cf..9639422 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1786,18 +1786,18 @@
             $lang = 'en';
         }
 
-        $script = json_encode(array(
+        $config = 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->add_label('selectimage', 'addimage');
+        $this->output->set_env('editor_config', $config);
         $this->output->include_script('tinymce/tinymce.min.js');
         $this->output->include_script('editor.js');
-        $this->output->add_script("rcmail_editor_init($script)", 'docready');
     }
 
     /**

--
Gitblit v1.9.1