plugins/tinymce_config

Aleksander Machniak machniak at kolabsys.com
Thu Nov 13 08:57:18 CET 2014


 plugins/tinymce_config/package.xml        |    4 +--
 plugins/tinymce_config/tinymce_config.php |   38 +++++++++++++++---------------
 2 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 262bd2d760a8617579c6ae2a1e2b93ba5242ed66
Author: Aleksander Machniak <alec at alec.pl>
Date:   Thu Nov 13 08:56:44 2014 +0100

    Fix compatibility with larry skin (#3907)

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 at 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 at kolabsys.com>
+ * Copyright (C) 2011-2014, Kolab Systems AG <contact at 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;
+    }
 }




More information about the commits mailing list