summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-11-13 07:56:44 (GMT)
committerAleksander Machniak <alec@alec.pl>2014-11-13 07:56:44 (GMT)
commit262bd2d760a8617579c6ae2a1e2b93ba5242ed66 (patch)
tree783f750f7a1b937efc3940bfe1db2fe9ebfefb56
parentf647d5923748309b721ee4d81a9526a89df5b2e8 (diff)
downloadroundcubemail-plugins-kolab-262bd2d760a8617579c6ae2a1e2b93ba5242ed66.tar.gz
Fix compatibility with larry skin (#3907)
-rw-r--r--plugins/tinymce_config/package.xml4
-rw-r--r--plugins/tinymce_config/tinymce_config.php38
2 files changed, 21 insertions, 21 deletions
diff --git a/plugins/tinymce_config/package.xml b/plugins/tinymce_config/package.xml
index 621d815..8018160 100644
--- a/plugins/tinymce_config/package.xml
+++ b/plugins/tinymce_config/package.xml
@@ -15,9 +15,9 @@
<email>machniak@kolabsys.com</email>
<active>yes</active>
</lead>
- <date>2012-10-12</date>
+ <date>2014-11-13</date>
<version>
- <release>0.1</release>
+ <release>0.2</release>
<api>0.1</api>
</version>
<stability>
diff --git a/plugins/tinymce_config/tinymce_config.php b/plugins/tinymce_config/tinymce_config.php
index 07b14e6..7fd1229 100644
--- a/plugins/tinymce_config/tinymce_config.php
+++ b/plugins/tinymce_config/tinymce_config.php
@@ -3,7 +3,7 @@
/**
* Sample plugin to configure TinyMCE editor
*
- * Copyright (C) 2011-2012, Kolab Systems AG <contact@kolabsys.com>
+ * Copyright (C) 2011-2014, Kolab Systems AG <contact@kolabsys.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -22,27 +22,27 @@
*/
class tinymce_config extends rcube_plugin
{
- public $task = 'mail|settings';
+ public $task = 'mail|settings';
- function init()
- {
- $this->add_hook('html_editor', array($this, 'config'));
- }
+ function init()
+ {
+ $this->add_hook('html_editor', array($this, 'config'));
+ }
- function config($args)
- {
- $rcmail = rcube::get_instance();
+ function config($args)
+ {
+ $config = array(
+ 'forced_root_block' => '',
+ 'force_p_newlines' => false,
+ 'force_br_newlines' => true,
+ );
- $config = array(
- 'forced_root_block' => '',
- 'force_p_newlines' => false,
- 'force_br_newlines' => true,
- );
+ $rcmail = rcube::get_instance();
+ $var = 'window.rcmail_editor_settings';
+ $script = sprintf("$var = \$.extend($var, %s);", json_encode($config));
- $script = sprintf('$.extend(window.rcmail_editor_settings, %s);', json_encode($config));
+ $rcmail->output->add_script($script, 'foot');
- $rcmail->output->add_script($script, 'foot');
-
- return $args;
- }
+ return $args;
+ }
}