Parcourir la source

#1100 Froala editor - minor refactoring

Alex Trofimov il y a 8 ans
Parent
commit
818849aeb7

+ 18 - 0
inc/classes/BxDolEditor.php

@@ -61,6 +61,8 @@ class BxDolEditor extends BxDolFactory implements iBxDolFactoryObject
 {
     protected $_sObject;
     protected $_aObject;
+    protected $_sConfCustom = '';
+    protected $_sButtonsCustom = false;
 
     /**
      * Constructor
@@ -111,6 +113,22 @@ class BxDolEditor extends BxDolFactory implements iBxDolFactoryObject
         return $this->_sObject;
     }
 
+    /**
+     * Set custom editor configuration options
+     */
+    public function setCustomConf ($s)
+    {
+        $this->_sConfCustom = $s;
+    }
+
+    /**
+     * Set custom toolbar
+     */
+    public function setCustomToolbarButtons ($sButtons)
+    {
+        $this->_sButtonsCustom = $sButtons;
+    }
+
     /**
      * Get minimal width which is neede for editor for the provided view mode
      */

+ 0 - 19
modules/boonex/froala/classes/BxFroalaEditor.php

@@ -75,9 +75,6 @@ EOS;
      */
     protected static $CONF_FULL = "";
 
-    protected $_sConfCustom = '';
-    protected $_sButtonsCustom = false;
-
     /**
      * Available editor languages
      */
@@ -95,22 +92,6 @@ EOS;
         else
             $this->_oTemplate = BxDolTemplate::getInstance();
     }
-
-    /**
-     * Set custom configuration option
-     */
-    public function setCustomConf ($s)
-    {
-        $this->_sConfCustom = $s;
-    }
-
-    /**
-     * Set custom toolbar
-     */
-    public function setCustomToolbarButtons ($sButtons)
-    {
-        $this->_sButtonsCustom = $sButtons;
-    }
     
     /**
      * Attach editor to HTML element, in most cases - textarea.

+ 0 - 10
template/scripts/BxBaseEditorTinyMCE.php

@@ -151,8 +151,6 @@ EOS;
                         image_advtab: true,
     ";
 
-    protected $_sConfCustom = '';
-
     /**
      * Available editor languages
      */
@@ -171,14 +169,6 @@ EOS;
             $this->_oTemplate = BxDolTemplate::getInstance();
     }
 
-    /**
-     * Set custom TinyMCE configuration option
-     */
-    public function setCustomConf ($s)
-    {
-        $this->_sConfCustom = $s;
-    }
-
     /**
      * Attach editor to HTML element, in most cases - textarea.
      * @param $sSelector - jQuery selector to attach editor to.