[TASK] RTE: Remove dependency of plugin classes on ExtJS inheritance 77/35177/3
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 9 Dec 2014 07:16:02 +0000 (02:16 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 9 Dec 2014 07:39:01 +0000 (08:39 +0100)
Use minimal custom inheritance.

Releases: master
Resolves: #63693
Change-Id: Ic7f306ca0be6989a29f1a04a232d0f642807a560
Reviewed-on: http://review.typo3.org/35177
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
36 files changed:
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/DOM/DOM.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Util/Util.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/Abbreviation.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/AboutEditor.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/BlockElements.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/BlockStyle.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/CharacterMap.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/ContextMenu.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/CopyPaste.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefaultClean.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefaultImage.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefaultInline.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefaultLink.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/DefinitionList.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/EditElement.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/EditorMode.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/FindReplace.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/InlineElements.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/InsertSmiley.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/Language.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/MicrodataSchema.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/PlainText.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/QuickTag.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/RemoveFormat.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/SelectFont.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/SpellChecker.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3Color.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3HtmlParser.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3Image.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3Link.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TableOperations.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TextIndicator.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TextStyle.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/UndoRedo.js
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/UserElements.js

index 1d6f48f..7941ce0 100644 (file)
@@ -14,8 +14,9 @@
  * HTMLArea.DOM: Utility functions for dealing with the DOM tree *
  *****************************************************************/
 define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
-       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent'],
-       function (UserAgent) {
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (UserAgent, Util) {
 
        var Dom = {
 
@@ -428,7 +429,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
                 * @return      void
                 */
                makeUrlsAbsolute: function (node, baseUrl, walker) {
-                       walker.walk(node, true, 'HTMLArea.DOM.makeImageSourceAbsolute(node, args[0]) || HTMLArea.DOM.makeLinkHrefAbsolute(node, args[0])', 'HTMLArea.util.emptyFunction', [baseUrl]);
+                       walker.walk(node, true, 'args[0].makeImageSourceAbsolute(node, args[2]) || args[0].makeLinkHrefAbsolute(node, args[2])', 'args[1].emptyFunction', [Dom, Util, baseUrl]);
                },
 
                /**
index 28e824b..153fda3 100644 (file)
@@ -44,617 +44,620 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
                this.configurePlugin(editor);
        };
 
-       /**
-        * Configures the plugin
-        * This function is invoked by the class constructor.
-        * This function should be redefined by the plugin subclass. Normal steps would be:
-        *      - registering plugin ingormation with method registerPluginInformation;
-        *      - registering any buttons with method registerButton;
-        *      - registering any drop-down lists with method registerDropDown.
-        *
-        * @param       object          editor: instance of RTE
-        *
-        * @return      boolean         true if the plugin was configured
-        */
-       Plugin.prototype.configurePlugin = function (editor) {
-               return false;
-       };
-
-       /**
-        * Registers the plugin "About" information
-        *
-        * @param       object          pluginInformation:
-        *                                      version         : the version,
-        *                                      developer       : the name of the developer,
-        *                                      developerUrl    : the url of the developer,
-        *                                      copyrightOwner  : the name of the copyright owner,
-        *                                      sponsor         : the name of the sponsor,
-        *                                      sponsorUrl      : the url of the sponsor,
-        *                                      license         : the type of license (should be "GPL")
-        *
-        * @return      boolean         true if the information was registered
-        */
-       Plugin.prototype.registerPluginInformation = function (pluginInformation) {
-               if (typeof pluginInformation !== 'object' || pluginInformation === null) {
-                       this.appendToLog('registerPluginInformation', 'Plugin information was not provided', 'warn');
+       Plugin.prototype = {
+
+               /**
+                * Configures the plugin
+                * This function is invoked by the class constructor.
+                * This function should be redefined by the plugin subclass. Normal steps would be:
+                *      - registering plugin ingormation with method registerPluginInformation;
+                *      - registering any buttons with method registerButton;
+                *      - registering any drop-down lists with method registerDropDown.
+                *
+                * @param       object          editor: instance of RTE
+                *
+                * @return      boolean         true if the plugin was configured
+                */
+               configurePlugin: function (editor) {
                        return false;
-               } else {
-                       this.pluginInformation = pluginInformation;
-                       this.pluginInformation.name = this.name;
-                       return true;
-               }
-       };
-
-       /**
-        * Returns the plugin information
-        *
-        * @return      object          the plugin information object
-        */
-       Plugin.prototype.getPluginInformation = function () {
-               return this.pluginInformation;
-       };
-
-       /**
-        * Returns a plugin object
-        *
-        * @param       string          pluinName: the name of some plugin
-        * @return      object          the plugin object or null
-        */
-       Plugin.prototype.getPluginInstance = function (pluginName) {
-               return this.editor.getPlugin(pluginName);
-       };
-
-       /**
-        * Returns a current editor mode
-        *
-        * @return      string          editor mode
-        */
-       Plugin.prototype.getEditorMode = function () {
-               return this.editor.getMode();
-       };
-
-       /**
-        * Returns true if the button is enabled in the toolbar configuration
-        *
-        * @param       string          buttonId: identification of the button
-        *
-        * @return      boolean         true if the button is enabled in the toolbar configuration
-        */
-       Plugin.prototype.isButtonInToolbar = function (buttonId) {
-               var index = -1;
-               var i, j, n, m;
-               for (i = 0, n = this.editorConfiguration.toolbar.length; i < n; i++) {
-                       var row = this.editorConfiguration.toolbar[i];
-                       for (j = 0, m = row.length; j < m; j++) {
-                               var group = row[j];
-                               index = group.indexOf(buttonId);
+               },
+
+               /**
+                * Registers the plugin "About" information
+                *
+                * @param       object          pluginInformation:
+                *                                      version         : the version,
+                *                                      developer       : the name of the developer,
+                *                                      developerUrl    : the url of the developer,
+                *                                      copyrightOwner  : the name of the copyright owner,
+                *                                      sponsor         : the name of the sponsor,
+                *                                      sponsorUrl      : the url of the sponsor,
+                *                                      license         : the type of license (should be "GPL")
+                *
+                * @return      boolean         true if the information was registered
+                */
+               registerPluginInformation: function (pluginInformation) {
+                       if (typeof pluginInformation !== 'object' || pluginInformation === null) {
+                               this.appendToLog('registerPluginInformation', 'Plugin information was not provided', 'warn');
+                               return false;
+                       } else {
+                               this.pluginInformation = pluginInformation;
+                               this.pluginInformation.name = this.name;
+                               return true;
+                       }
+               },
+
+               /**
+                * Returns the plugin information
+                *
+                * @return      object          the plugin information object
+                */
+               getPluginInformation: function () {
+                       return this.pluginInformation;
+               },
+
+               /**
+                * Returns a plugin object
+                *
+                * @param       string          pluinName: the name of some plugin
+                * @return      object          the plugin object or null
+                */
+               getPluginInstance: function (pluginName) {
+                       return this.editor.getPlugin(pluginName);
+               },
+
+               /**
+                * Returns a current editor mode
+                *
+                * @return      string          editor mode
+                */
+               getEditorMode: function () {
+                       return this.editor.getMode();
+               },
+
+               /**
+                * Returns true if the button is enabled in the toolbar configuration
+                *
+                * @param       string          buttonId: identification of the button
+                *
+                * @return      boolean         true if the button is enabled in the toolbar configuration
+                */
+               isButtonInToolbar: function (buttonId) {
+                       var index = -1;
+                       var i, j, n, m;
+                       for (i = 0, n = this.editorConfiguration.toolbar.length; i < n; i++) {
+                               var row = this.editorConfiguration.toolbar[i];
+                               for (j = 0, m = row.length; j < m; j++) {
+                                       var group = row[j];
+                                       index = group.indexOf(buttonId);
+                                       if (index !== -1) {
+                                               break;
+                                       }
+                               }
                                if (index !== -1) {
                                        break;
                                }
                        }
-                       if (index !== -1) {
-                               break;
-                       }
-               }
-               return index !== -1;
-       };
-
-       /**
-        * Returns the button object from the toolbar
-        *
-        * @param       string          buttonId: identification of the button
-        *
-        * @return      object          the toolbar button object
-        */
-       Plugin.prototype.getButton = function (buttonId) {
-               return this.editor.toolbar.getButton(buttonId);
-       };
-
-       /**
-        * Registers a button for inclusion in the toolbar
-        *
-        * @param       object          buttonConfiguration: the configuration object of the button:
-        *                                      id              : unique id for the button
-        *                                      tooltip         : tooltip for the button
-        *                                      textMode        : enable in text mode
-        *                                      action          : name of the function invoked when the button is pressed
-        *                                      context         : will be disabled if not inside one of listed elements
-        *                                      hide            : hide in menu and show only in context menu (deprecated, use hidden)
-        *                                      hidden          : synonym of hide
-        *                                      selection       : will be disabled if there is no selection
-        *                                      hotkey          : hotkey character
-        *                                      dialog          : if true, the button opens a dialogue
-        *                                      dimensions      : the opening dimensions object of the dialogue window
-        *
-        * @return      boolean         true if the button was successfully registered
-        */
-       Plugin.prototype.registerButton = function (buttonConfiguration) {
-               if (this.isButtonInToolbar(buttonConfiguration.id)) {
-                       if (typeof buttonConfiguration.action === 'string' && buttonConfiguration.action.length > 0 && typeof this[buttonConfiguration.action] === 'function') {
-                               buttonConfiguration.plugins = this;
-                               if (buttonConfiguration.dialog) {
-                                       if (!buttonConfiguration.dimensions) {
-                                               buttonConfiguration.dimensions = { width: 250, height: 250};
-                                       }
-                                       buttonConfiguration.dimensions.top = buttonConfiguration.dimensions.top ?  buttonConfiguration.dimensions.top : this.editorConfiguration.dialogueWindows.defaultPositionFromTop;
-                                       buttonConfiguration.dimensions.left = buttonConfiguration.dimensions.left ?  buttonConfiguration.dimensions.left : this.editorConfiguration.dialogueWindows.defaultPositionFromLeft;
-                               }
-                               buttonConfiguration.hidden = buttonConfiguration.hide;
-                               // Apply additional ExtJS config properties set in Page TSConfig
-                               // May not always work for values that must be integers
-                               Util.applyIf(buttonConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]]);
-                               if (this.editorConfiguration.registerButton(buttonConfiguration)) {
-                                       var hotKey = buttonConfiguration.hotKey ? buttonConfiguration.hotKey :
-                                               ((this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]] && this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]].hotKey) ? this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]].hotKey : null);
-                                       if (!hotKey && buttonConfiguration.hotKey == "0") {
-                                               hotKey = "0";
-                                       }
-                                       if (!hotKey && this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]] && this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]].hotKey == "0") {
-                                               hotKey = "0";
+                       return index !== -1;
+               },
+
+               /**
+                * Returns the button object from the toolbar
+                *
+                * @param       string          buttonId: identification of the button
+                *
+                * @return      object          the toolbar button object
+                */
+               getButton: function (buttonId) {
+                       return this.editor.toolbar.getButton(buttonId);
+               },
+
+               /**
+                * Registers a button for inclusion in the toolbar
+                *
+                * @param       object          buttonConfiguration: the configuration object of the button:
+                *                                      id              : unique id for the button
+                *                                      tooltip         : tooltip for the button
+                *                                      textMode        : enable in text mode
+                *                                      action          : name of the function invoked when the button is pressed
+                *                                      context         : will be disabled if not inside one of listed elements
+                *                                      hide            : hide in menu and show only in context menu (deprecated, use hidden)
+                *                                      hidden          : synonym of hide
+                *                                      selection       : will be disabled if there is no selection
+                *                                      hotkey          : hotkey character
+                *                                      dialog          : if true, the button opens a dialogue
+                *                                      dimensions      : the opening dimensions object of the dialogue window
+                *
+                * @return      boolean         true if the button was successfully registered
+                */
+               registerButton: function (buttonConfiguration) {
+                       if (this.isButtonInToolbar(buttonConfiguration.id)) {
+                               if (typeof buttonConfiguration.action === 'string' && buttonConfiguration.action.length > 0 && typeof this[buttonConfiguration.action] === 'function') {
+                                       buttonConfiguration.plugins = this;
+                                       if (buttonConfiguration.dialog) {
+                                               if (!buttonConfiguration.dimensions) {
+                                                       buttonConfiguration.dimensions = { width: 250, height: 250};
+                                               }
+                                               buttonConfiguration.dimensions.top = buttonConfiguration.dimensions.top ?  buttonConfiguration.dimensions.top : this.editorConfiguration.dialogueWindows.defaultPositionFromTop;
+                                               buttonConfiguration.dimensions.left = buttonConfiguration.dimensions.left ?  buttonConfiguration.dimensions.left : this.editorConfiguration.dialogueWindows.defaultPositionFromLeft;
                                        }
-                                       if (hotKey || hotKey == "0") {
-                                               var hotKeyConfiguration = {
-                                                       id      : hotKey,
-                                                       cmd     : buttonConfiguration.id
-                                               };
-                                               return this.registerHotKey(hotKeyConfiguration);
+                                       buttonConfiguration.hidden = buttonConfiguration.hide;
+                                       // Apply additional ExtJS config properties set in Page TSConfig
+                                       // May not always work for values that must be integers
+                                       Util.applyIf(buttonConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]]);
+                                       if (this.editorConfiguration.registerButton(buttonConfiguration)) {
+                                               var hotKey = buttonConfiguration.hotKey ? buttonConfiguration.hotKey :
+                                                       ((this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]] && this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]].hotKey) ? this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]].hotKey : null);
+                                               if (!hotKey && buttonConfiguration.hotKey == "0") {
+                                                       hotKey = "0";
+                                               }
+                                               if (!hotKey && this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]] && this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]].hotKey == "0") {
+                                                       hotKey = "0";
+                                               }
+                                               if (hotKey || hotKey == "0") {
+                                                       var hotKeyConfiguration = {
+                                                               id      : hotKey,
+                                                               cmd     : buttonConfiguration.id
+                                                       };
+                                                       return this.registerHotKey(hotKeyConfiguration);
+                                               }
+                                               return true;
                                        }
-                                       return true;
+                               } else {
+                                       this.appendToLog('registerButton', 'Function ' + buttonConfiguration.action + ' was not defined when registering button ' + buttonConfiguration.id, 'error');
                                }
-                       } else {
-                               this.appendToLog('registerButton', 'Function ' + buttonConfiguration.action + ' was not defined when registering button ' + buttonConfiguration.id, 'error');
                        }
-               }
-               return false;
-       };
-
-       /**
-        * Registers a drop-down list for inclusion in the toolbar
-        *
-        * @param       object          dropDownConfiguration: the configuration object of the drop-down:
-        *                                      id              : unique id for the drop-down
-        *                                      tooltip         : tooltip for the drop-down
-        *                                      action          : name of function to invoke when an option is selected
-        *                                      textMode        : enable in text mode
-        *
-        * @return      boolean         true if the drop-down list was successfully registered
-        */
-       Plugin.prototype.registerDropDown = function (dropDownConfiguration) {
-               if (this.isButtonInToolbar(dropDownConfiguration.id)) {
-                       if (typeof dropDownConfiguration.action === 'string' && dropDownConfiguration.action.length > 0 && typeof this[dropDownConfiguration.action] === 'function') {
-                               dropDownConfiguration.plugins = this;
-                               dropDownConfiguration.hidden = dropDownConfiguration.hide;
-                               dropDownConfiguration.xtype = 'htmlareacombo';
-                               // Apply additional ExtJS config properties set in Page TSConfig
-                               // May not always work for values that must be integers
-                               Util.applyIf(dropDownConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[dropDownConfiguration.id]]);
-                               return this.editorConfiguration.registerButton(dropDownConfiguration);
+                       return false;
+               },
+
+               /**
+                * Registers a drop-down list for inclusion in the toolbar
+                *
+                * @param       object          dropDownConfiguration: the configuration object of the drop-down:
+                *                                      id              : unique id for the drop-down
+                *                                      tooltip         : tooltip for the drop-down
+                *                                      action          : name of function to invoke when an option is selected
+                *                                      textMode        : enable in text mode
+                *
+                * @return      boolean         true if the drop-down list was successfully registered
+                */
+               registerDropDown: function (dropDownConfiguration) {
+                       if (this.isButtonInToolbar(dropDownConfiguration.id)) {
+                               if (typeof dropDownConfiguration.action === 'string' && dropDownConfiguration.action.length > 0 && typeof this[dropDownConfiguration.action] === 'function') {
+                                       dropDownConfiguration.plugins = this;
+                                       dropDownConfiguration.hidden = dropDownConfiguration.hide;
+                                       dropDownConfiguration.xtype = 'htmlareacombo';
+                                       // Apply additional ExtJS config properties set in Page TSConfig
+                                       // May not always work for values that must be integers
+                                       Util.applyIf(dropDownConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[dropDownConfiguration.id]]);
+                                       return this.editorConfiguration.registerButton(dropDownConfiguration);
+                               } else {
+                                       this.appendToLog('registerDropDown', 'Function ' + dropDownConfiguration.action + ' was not defined when registering drop-down ' + dropDownConfiguration.id, 'error');
+                               }
+                       }
+                       return false;
+               },
+
+               /**
+                * Registers a text element for inclusion in the toolbar
+                *
+                * @param       object          textConfiguration: the configuration object of the text element:
+                *                                      id              : unique id for the text item
+                *                                      text            : the text litteral
+                *                                      tooltip         : tooltip for the text item
+                *                                      cls             : a css class to be assigned to the text element
+                *
+                * @return      boolean         true if the drop-down list was successfully registered
+                */
+               registerText: function (textConfiguration) {
+                       if (this.isButtonInToolbar(textConfiguration.id)) {
+                               textConfiguration.plugins = this;
+                               textConfiguration.xtype = 'htmlareatoolbartext';
+                               return this.editorConfiguration.registerButton(textConfiguration);
+                       }
+                       return false;
+               },
+
+               /**
+                * Returns the drop-down configuration
+                *
+                * @param       string          dropDownId: the unique id of the drop-down
+                *
+                * @return      object          the drop-down configuration object
+                */
+               getDropDownConfiguration: function(dropDownId) {
+                       return this.editorConfiguration.buttonsConfig[dropDownId];
+               },
+
+               /**
+                * Registors a hotkey
+                *
+                * @param       object          hotKeyConfiguration: the configuration object of the hotkey:
+                *                                      id              : the key
+                *                                      cmd             : name of the button corresponding to the hot key
+                *                                      element         : value of the record to be selected in the dropDown item
+                *
+                * @return      boolean         true if the hotkey was successfully registered
+                */
+               registerHotKey: function (hotKeyConfiguration) {
+                       return this.editorConfiguration.registerHotKey(hotKeyConfiguration);
+               },
+
+               /**
+                * Returns the buttonId corresponding to the hotkey, if any
+                *
+                * @param       string          key: the hotkey
+                *
+                * @return      string          the buttonId or ""
+                */
+               translateHotKey: function(key) {
+                       if (typeof this.editorConfiguration.hotKeyList[key] !== 'undefined') {
+                               var buttonId = this.editorConfiguration.hotKeyList[key].cmd;
+                               if (typeof buttonId !== 'undefined') {
+                                       return buttonId;
+                               } else {
+                                       return "";
+                               }
+                       }
+                       return "";
+               },
+
+               /**
+                * Returns the hotkey configuration
+                *
+                * @param       string          key: the hotkey
+                *
+                * @return      object          the hotkey configuration object
+                */
+               getHotKeyConfiguration: function(key) {
+                       if (typeof this.editorConfiguration.hotKeyList[key] !== 'undefined') {
+                               return this.editorConfiguration.hotKeyList[key];
                        } else {
-                               this.appendToLog('registerDropDown', 'Function ' + dropDownConfiguration.action + ' was not defined when registering drop-down ' + dropDownConfiguration.id, 'error');
+                               return null;
                        }
-               }
-               return false;
-       };
-
-       /**
-        * Registers a text element for inclusion in the toolbar
-        *
-        * @param       object          textConfiguration: the configuration object of the text element:
-        *                                      id              : unique id for the text item
-        *                                      text            : the text litteral
-        *                                      tooltip         : tooltip for the text item
-        *                                      cls             : a css class to be assigned to the text element
-        *
-        * @return      boolean         true if the drop-down list was successfully registered
-        */
-       Plugin.prototype.registerText = function (textConfiguration) {
-               if (this.isButtonInToolbar(textConfiguration.id)) {
-                       textConfiguration.plugins = this;
-                       textConfiguration.xtype = 'htmlareatoolbartext';
-                       return this.editorConfiguration.registerButton(textConfiguration);
-               }
-               return false;
-       };
-
-       /**
-        * Returns the drop-down configuration
-        *
-        * @param       string          dropDownId: the unique id of the drop-down
-        *
-        * @return      object          the drop-down configuration object
-        */
-       Plugin.prototype.getDropDownConfiguration = function(dropDownId) {
-               return this.editorConfiguration.buttonsConfig[dropDownId];
-       };
-
-       /**
-        * Registors a hotkey
-        *
-        * @param       object          hotKeyConfiguration: the configuration object of the hotkey:
-        *                                      id              : the key
-        *                                      cmd             : name of the button corresponding to the hot key
-        *                                      element         : value of the record to be selected in the dropDown item
-        *
-        * @return      boolean         true if the hotkey was successfully registered
-        */
-       Plugin.prototype.registerHotKey = function (hotKeyConfiguration) {
-               return this.editorConfiguration.registerHotKey(hotKeyConfiguration);
-       };
-
-       /**
-        * Returns the buttonId corresponding to the hotkey, if any
-        *
-        * @param       string          key: the hotkey
-        *
-        * @return      string          the buttonId or ""
-        */
-       Plugin.prototype.translateHotKey = function(key) {
-               if (typeof this.editorConfiguration.hotKeyList[key] !== 'undefined') {
-                       var buttonId = this.editorConfiguration.hotKeyList[key].cmd;
-                       if (typeof buttonId !== 'undefined') {
-                               return buttonId;
+               },
+
+               /**
+                * Initializes the plugin
+                * Is invoked when the toolbar component is created (subclass of Ext.ux.HTMLAreaButton or Ext.ux.form.HTMLAreaCombo)
+                *
+                * @param       object          button: the component
+                *
+                * @return      void
+                */
+               init: Util.emptyFunction,
+
+               /**
+                * The toolbar refresh handler of the plugin
+                * This function may be defined by the plugin subclass.
+                * If defined, the function will be invoked whenever the toolbar state is refreshed.
+                *
+                * @return      boolean
+                */
+               onUpdateToolbar: Util.emptyFunction,
+
+               /**
+                * The onMode event handler
+                * This function may be redefined by the plugin subclass.
+                * The function is invoked whenever the editor changes mode.
+                *
+                * @param       string          mode: "wysiwyg" or "textmode"
+                *
+                * @return      boolean
+                */
+               onMode: function(mode) {
+                       if (mode === "textmode" && this.dialog && !(this.dialog.buttonId && this.editorConfiguration.buttons[this.dialog.buttonId] && this.editorConfiguration.buttons[this.dialog.buttonId].textMode)) {
+                               this.dialog.close();
+                       }
+               },
+
+               /**
+                * The onGenerate event handler
+                * This function may be defined by the plugin subclass.
+                * The function is invoked when the editor is initialized
+                *
+                * @return      boolean
+                */
+               onGenerate: Util.emptyFunction,
+
+               /**
+                * Localize a string
+                *
+                * @param       string          label: the name of the label to localize
+                *
+                * @return      string          the localization of the label
+                */
+               localize: function (label, plural) {
+                       var i = plural || 0;
+                       var localized = this.I18N[label];
+                       if (typeof localized === 'object' && localized !== null && typeof localized[i] !== 'undefined') {
+                               localized = localized[i]['target'];
                        } else {
-                               return "";
+                               localized = HTMLArea.localize(label, plural);
                        }
-               }
-               return "";
-       };
-
-       /**
-        * Returns the hotkey configuration
-        *
-        * @param       string          key: the hotkey
-        *
-        * @return      object          the hotkey configuration object
-        */
-       Plugin.prototype.getHotKeyConfiguration = function(key) {
-               if (typeof this.editorConfiguration.hotKeyList[key] !== 'undefined') {
-                       return this.editorConfiguration.hotKeyList[key];
-               } else {
-                       return null;
-               }
-       };
-
-       /**
-        * Initializes the plugin
-        * Is invoked when the toolbar component is created (subclass of Ext.ux.HTMLAreaButton or Ext.ux.form.HTMLAreaCombo)
-        *
-        * @param       object          button: the component
-        *
-        * @return      void
-        */
-       Plugin.prototype.init = Util.emptyFunction;
-
-       /**
-        * The toolbar refresh handler of the plugin
-        * This function may be defined by the plugin subclass.
-        * If defined, the function will be invoked whenever the toolbar state is refreshed.
-        *
-        * @return      boolean
-        */
-       Plugin.prototype.onUpdateToolbar = Util.emptyFunction;
-
-       /**
-        * The onMode event handler
-        * This function may be redefined by the plugin subclass.
-        * The function is invoked whenever the editor changes mode.
-        *
-        * @param       string          mode: "wysiwyg" or "textmode"
-        *
-        * @return      boolean
-        */
-       Plugin.prototype.onMode = function(mode) {
-               if (mode === "textmode" && this.dialog && !(this.dialog.buttonId && this.editorConfiguration.buttons[this.dialog.buttonId] && this.editorConfiguration.buttons[this.dialog.buttonId].textMode)) {
-                       this.dialog.close();
-               }
-       };
-
-       /**
-        * The onGenerate event handler
-        * This function may be defined by the plugin subclass.
-        * The function is invoked when the editor is initialized
-        *
-        * @return      boolean
-        */
-       Plugin.prototype.onGenerate = Util.emptyFunction;
-
-       /**
-        * Localize a string
-        *
-        * @param       string          label: the name of the label to localize
-        *
-        * @return      string          the localization of the label
-        */
-       Plugin.prototype.localize = function (label, plural) {
-               var i = plural || 0;
-               var localized = this.I18N[label];
-               if (typeof localized === 'object' && localized !== null && typeof localized[i] !== 'undefined') {
-                       localized = localized[i]['target'];
-               } else {
-                       localized = HTMLArea.localize(label, plural);
-               }
-               return localized;
-       };
-
-       /**
-        * Get localized label wrapped with contextual help markup when available
-        *
-        * @param       string          fieldName: the name of the field in the CSH file
-        * @param       string          label: the name of the label to localize
-        * @param       string          pluginName: overrides this.name
-        *
-        * @return      string          localized label with CSH markup
-        */
-       Plugin.prototype.getHelpTip = function (fieldName, label, pluginName) {
-               if (typeof TYPO3.ContextHelp !== 'undefined' && typeof fieldName === 'string') {
-                       var pluginName = typeof pluginName !== 'undefined' ? pluginName : this.name;
-                       if (fieldName.length > 0) {
-                               fieldName = fieldName.replace(/-|\s/gi, '_');
+                       return localized;
+               },
+
+               /**
+                * Get localized label wrapped with contextual help markup when available
+                *
+                * @param       string          fieldName: the name of the field in the CSH file
+                * @param       string          label: the name of the label to localize
+                * @param       string          pluginName: overrides this.name
+                *
+                * @return      string          localized label with CSH markup
+                */
+               getHelpTip: function (fieldName, label, pluginName) {
+                       if (typeof TYPO3.ContextHelp !== 'undefined' && typeof fieldName === 'string') {
+                               var pluginName = typeof pluginName !== 'undefined' ? pluginName : this.name;
+                               if (fieldName.length > 0) {
+                                       fieldName = fieldName.replace(/-|\s/gi, '_');
+                               }
+                               return '<span class="t3-help-link" href="#" data-table="xEXT_rtehtmlarea_' + pluginName + '" data-field="' + fieldName + '"><abbr class="t3-help-teaser">' + (this.localize(label) || label) + '</abbr></span>';
+                       } else {
+                               return this.localize(label) || label;
                        }
-                       return '<span class="t3-help-link" href="#" data-table="xEXT_rtehtmlarea_' + pluginName + '" data-field="' + fieldName + '"><abbr class="t3-help-teaser">' + (this.localize(label) || label) + '</abbr></span>';
-               } else {
-                       return this.localize(label) || label;
-               }
-       };
-
-       /**
-        * Load a Javascript file asynchronously
-        *
-        * @param       string          url: url of the file to load
-        * @param       function        callBack: the callBack function
-        *
-        * @return      boolean         true on success of the request submission
-        */
-       Plugin.prototype.getJavascriptFile = function (url, callback) {
-               return this.editor.ajax.getJavascriptFile(url, callback, this);
-       };
-
-       /**
-        * Post data to the server
-        *
-        * @param       string          url: url to post data to
-        * @param       object          data: data to be posted
-        * @param       function        callback: function that will handle the response returned by the server
-        *
-        * @return      boolean         true on success
-        */
-       Plugin.prototype.postData = function (url, data, callback) {
-               return this.editor.ajax.postData(url, data, callback, this);
-       };
-
-       /**
-        * Open a window with container iframe
-        *
-        * @param       string          buttonId: the id of the button
-        * @param       string          title: the window title (will be localized here)
-        * @param       object          dimensions: the opening dimensions od the window
-        * @param       string          url: the url to load ino the iframe
-        *
-        * @ return     void
-        */
-       Plugin.prototype.openContainerWindow = function (buttonId, title, dimensions, url) {
-               this.dialog = new Ext.Window({
-                       id: this.editor.editorId + buttonId,
-                       title: this.localize(title) || title,
-                       cls: 'htmlarea-window',
-                       width: dimensions.width,
-                       border: false,
-                       iconCls: this.getButton(buttonId).iconCls,
-                       listeners: {
-                               afterrender: {
-                                       fn: this.onContainerResize
+               },
+
+               /**
+                * Load a Javascript file asynchronously
+                *
+                * @param       string          url: url of the file to load
+                * @param       function        callBack: the callBack function
+                *
+                * @return      boolean         true on success of the request submission
+                */
+               getJavascriptFile: function (url, callback) {
+                       return this.editor.ajax.getJavascriptFile(url, callback, this);
+               },
+
+               /**
+                * Post data to the server
+                *
+                * @param       string          url: url to post data to
+                * @param       object          data: data to be posted
+                * @param       function        callback: function that will handle the response returned by the server
+                *
+                * @return      boolean         true on success
+                */
+               postData: function (url, data, callback) {
+                       return this.editor.ajax.postData(url, data, callback, this);
+               },
+
+               /**
+                * Open a window with container iframe
+                *
+                * @param       string          buttonId: the id of the button
+                * @param       string          title: the window title (will be localized here)
+                * @param       object          dimensions: the opening dimensions od the window
+                * @param       string          url: the url to load ino the iframe
+                *
+                * @ return     void
+                */
+               openContainerWindow: function (buttonId, title, dimensions, url) {
+                       this.dialog = new Ext.Window({
+                               id: this.editor.editorId + buttonId,
+                               title: this.localize(title) || title,
+                               cls: 'htmlarea-window',
+                               width: dimensions.width,
+                               border: false,
+                               iconCls: this.getButton(buttonId).iconCls,
+                               listeners: {
+                                       afterrender: {
+                                               fn: this.onContainerResize
+                                       },
+                                       resize: {
+                                               fn: this.onContainerResize
+                                       },
+                                       close: {
+                                               fn: this.onClose,
+                                               scope: this
+                                       }
                                },
-                               resize: {
-                                       fn: this.onContainerResize
+                               items: {
+                                               // The content iframe
+                                       xtype: 'box',
+                                       height: dimensions.height-20,
+                                       itemId: 'content-iframe',
+                                       autoEl: {
+                                               tag: 'iframe',
+                                               cls: 'content-iframe',
+                                               src: url
+                                       }
                                },
-                               close: {
-                                       fn: this.onClose,
-                                       scope: this
-                               }
-                       },
-                       items: {
-                                       // The content iframe
-                               xtype: 'box',
-                               height: dimensions.height-20,
-                               itemId: 'content-iframe',
-                               autoEl: {
-                                       tag: 'iframe',
-                                       cls: 'content-iframe',
-                                       src: url
+                               maximizable: true
+                       });
+                       this.show();
+               },
+
+               /**
+                * Handler invoked when the container window is rendered or resized in order to resize the content iframe to maximum size
+                */
+               onContainerResize: function (panel) {
+                       var iframe = panel.getComponent('content-iframe');
+                       if (iframe.rendered) {
+                               iframe.getEl().setSize(panel.getInnerWidth(), panel.getInnerHeight());
+                       }
+               },
+
+               /**
+                * Get the opening diment=sions of the window
+                *
+                * @param       object          dimensions: default opening width and height set by the plugin
+                * @param       string          buttonId: the id of the button that is triggering the opening of the window
+                *
+                * @return      object          opening width and height of the window
+                */
+               getWindowDimensions: function (dimensions, buttonId) {
+                       // Apply default dimensions
+                       this.dialogueWindowDimensions = {
+                               width: 250,
+                               height: 250
+                       };
+                       // Apply default values as per PageTSConfig
+                       Util.apply(this.dialogueWindowDimensions, this.editorConfiguration.dialogueWindows);
+                       // Apply dimensions as per button registration
+                       if (typeof this.editorConfiguration.buttonsConfig[buttonId] === 'object' && this.editorConfiguration.buttonsConfig[buttonId] !== null) {
+                               Util.apply(this.dialogueWindowDimensions, this.editorConfiguration.buttonsConfig[buttonId].dimensions);
+                       }
+                       // Apply dimensions as per call
+                       Util.apply(this.dialogueWindowDimensions, dimensions);
+                       // Overrride dimensions as per PageTSConfig
+                       var buttonConfiguration = this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonId]];
+                       if (buttonConfiguration) {
+                               Util.apply(this.dialogueWindowDimensions, buttonConfiguration.dialogueWindow);
+                       }
+                       return this.dialogueWindowDimensions;
+               },
+
+               /**
+                * Make url from module path
+                *
+                * @param       string          modulePath: module path
+                * @param       string          parameters: additional parameters
+                *
+                * @return      string          the url
+                */
+               makeUrlFromModulePath: function (modulePath, parameters) {
+                       return modulePath + (modulePath.indexOf("?") === -1 ? "?" : "&") + this.editorConfiguration.RTEtsConfigParams + '&editorNo=' + this.editor.editorId + '&sys_language_content=' + this.editorConfiguration.sys_language_content + '&contentTypo3Language=' + this.editorConfiguration.typo3ContentLanguage + (parameters?parameters:'');
+               },
+
+               /**
+                * Append an entry at the end of the troubleshooting log
+                *
+                * @param       string          functionName: the name of the plugin function writing to the log
+                * @param       string          text: the text of the message
+                * @param       string          type: the typeof of message: 'log', 'info', 'warn' or 'error'
+                *
+                * @return      void
+                */
+               appendToLog: function (functionName, text, type) {
+                       this.editor.appendToLog(this.name, functionName, text, type);
+               },
+
+               /**
+                * Add a config element to config array if not empty
+                *
+                * @param       object          configElement: the config element
+                * @param       array           configArray: the config array
+                *
+                * @return      void
+                */
+               addConfigElement: function (configElement, configArray) {
+                       if (typeof configElement === 'object'  && configElement !== null) {
+                               configArray.push(configElement);
+                       }
+               },
+
+               /**
+                * Handler for Ext.TabPanel tabchange event
+                * Force window ghost height synchronization
+                * Working around ExtJS 3.1 bug
+                */
+               syncHeight: function (tabPanel, tab) {
+                       var position = this.dialog.getPosition();
+                       if (position[0] > 0) {
+                               this.dialog.setPosition(position);
+                       }
+               },
+
+               /**
+                * Show the dialogue window
+                */
+               show: function () {
+                       // Close the window if the editor changes mode
+                       var self = this;
+                       Event.one(this.editor, 'HTMLAreaEventModeChange', function (event) { self.close(); });
+                       this.saveSelection();
+                       if (typeof this.dialogueWindowDimensions !== 'undefined') {
+                               this.dialog.setPosition(this.dialogueWindowDimensions.positionFromLeft, this.dialogueWindowDimensions.positionFromTop);
+                       }
+                       this.dialog.show();
+                       this.restoreSelection();
+               },
+
+               /**
+                * Remove listeners
+                * This function may be defined by the plugin subclass.
+                * The function is invoked when a plugin dialog is closed
+                * @return void
+                */
+               removeListeners: Util.emptyFunction,
+
+               /**
+                * Close the dialogue window (after saving the selection, if IE)
+                */
+               close: function () {
+                       this.removeListeners();
+                       this.saveSelection();
+                       this.dialog.close();
+               },
+
+               /**
+                * Dialogue window onClose handler
+                */
+               onClose: function () {
+                       this.removeListeners();
+                       this.editor.focus();
+                       this.restoreSelection();
+                       this.editor.updateToolbar();
+               },
+
+               /**
+                * Handler for window cancel
+                */
+               onCancel: function () {
+                       this.removeListeners();
+                       this.dialog.close();
+                       this.editor.focus();
+               },
+
+               /**
+                * Save selection
+                * Should be called after processing button other than Cancel
+                */
+               saveSelection: function () {
+                       // If IE, save the current selection
+                       if (UserAgent.isIE) {
+                               this.savedRange = this.editor.getSelection().createRange();
+                       }
+               },
+
+               /**
+                * Restore selection
+                * Should be called before processing dialogue button or result
+                */
+               restoreSelection: function () {
+                       // If IE, restore the selection saved when the window was shown
+                       if (UserAgent.isIE && this.savedRange) {
+                                       // Restoring the selection will not work if the inner html was replaced by the plugin
+                               try {
+                                       this.editor.getSelection().selectRange(this.savedRange);
+                               } catch (e) {}
+                       }
+               },
+
+               /**
+                * Build the configuration object of a button
+                *
+                * @param       string          button: the text of the button
+                * @param       function        handler: button handler
+                *
+                * @return      object          the button configuration object
+                */
+               buildButtonConfig: function (button, handler) {
+                       return {
+                               xtype: 'button',
+                               text: this.localize(button),
+                               listeners: {
+                                       click: {
+                                               fn: handler,
+                                               scope: this
+                                       }
                                }
-                       },
-                       maximizable: true
-               });
-               this.show();
-       };
-
-       /**
-        * Handler invoked when the container window is rendered or resized in order to resize the content iframe to maximum size
-        */
-       Plugin.prototype.onContainerResize = function (panel) {
-               var iframe = panel.getComponent('content-iframe');
-               if (iframe.rendered) {
-                       iframe.getEl().setSize(panel.getInnerWidth(), panel.getInnerHeight());
-               }
-       };
-
-       /**
-        * Get the opening diment=sions of the window
-        *
-        * @param       object          dimensions: default opening width and height set by the plugin
-        * @param       string          buttonId: the id of the button that is triggering the opening of the window
-        *
-        * @return      object          opening width and height of the window
-        */
-       Plugin.prototype.getWindowDimensions = function (dimensions, buttonId) {
-               // Apply default dimensions
-               this.dialogueWindowDimensions = {
-                       width: 250,
-                       height: 250
-               };
-               // Apply default values as per PageTSConfig
-               Util.apply(this.dialogueWindowDimensions, this.editorConfiguration.dialogueWindows);
-               // Apply dimensions as per button registration
-               if (typeof this.editorConfiguration.buttonsConfig[buttonId] === 'object' && this.editorConfiguration.buttonsConfig[buttonId] !== null) {
-                       Util.apply(this.dialogueWindowDimensions, this.editorConfiguration.buttonsConfig[buttonId].dimensions);
-               }
-               // Apply dimensions as per call
-               Util.apply(this.dialogueWindowDimensions, dimensions);
-               // Overrride dimensions as per PageTSConfig
-               var buttonConfiguration = this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonId]];
-               if (buttonConfiguration) {
-                       Util.apply(this.dialogueWindowDimensions, buttonConfiguration.dialogueWindow);
-               }
-               return this.dialogueWindowDimensions;
-       };
-
-       /**
-        * Make url from module path
-        *
-        * @param       string          modulePath: module path
-        * @param       string          parameters: additional parameters
-        *
-        * @return      string          the url
-        */
-       Plugin.prototype.makeUrlFromModulePath = function (modulePath, parameters) {
-               return modulePath + (modulePath.indexOf("?") === -1 ? "?" : "&") + this.editorConfiguration.RTEtsConfigParams + '&editorNo=' + this.editor.editorId + '&sys_language_content=' + this.editorConfiguration.sys_language_content + '&contentTypo3Language=' + this.editorConfiguration.typo3ContentLanguage + (parameters?parameters:'');
-       };
-
-       /**
-        * Append an entry at the end of the troubleshooting log
-        *
-        * @param       string          functionName: the name of the plugin function writing to the log
-        * @param       string          text: the text of the message
-        * @param       string          type: the typeof of message: 'log', 'info', 'warn' or 'error'
-        *
-        * @return      void
-        */
-       Plugin.prototype.appendToLog = function (functionName, text, type) {
-               this.editor.appendToLog(this.name, functionName, text, type);
-       };
-
-       /**
-        * Add a config element to config array if not empty
-        *
-        * @param       object          configElement: the config element
-        * @param       array           configArray: the config array
-        *
-        * @return      void
-        */
-       Plugin.prototype.addConfigElement = function (configElement, configArray) {
-               if (typeof configElement === 'object'  && configElement !== null) {
-                       configArray.push(configElement);
-               }
-       };
-
-       /**
-        * Handler for Ext.TabPanel tabchange event
-        * Force window ghost height synchronization
-        * Working around ExtJS 3.1 bug
-        */
-       Plugin.prototype.syncHeight = function (tabPanel, tab) {
-               var position = this.dialog.getPosition();
-               if (position[0] > 0) {
-                       this.dialog.setPosition(position);
-               }
-       };
-
-       /**
-        * Show the dialogue window
-        */
-       Plugin.prototype.show = function () {
-               // Close the window if the editor changes mode
-               var self = this;
-               Event.one(this.editor, 'HTMLAreaEventModeChange', function (event) { self.close(); });
-               this.saveSelection();
-               if (typeof this.dialogueWindowDimensions !== 'undefined') {
-                       this.dialog.setPosition(this.dialogueWindowDimensions.positionFromLeft, this.dialogueWindowDimensions.positionFromTop);
-               }
-               this.dialog.show();
-               this.restoreSelection();
-       };
-
-       /**
-        * Remove listeners
-        * This function may be defined by the plugin subclass.
-        * The function is invoked when a plugin dialog is closed
-        * @return void
-        */
-       Plugin.prototype.removeListeners = Util.emptyFunction;
-
-       /**
-        * Close the dialogue window (after saving the selection, if IE)
-        */
-       Plugin.prototype.close = function () {
-               this.removeListeners();
-               this.saveSelection();
-               this.dialog.close();
-       };
-
-       /**
-        * Dialogue window onClose handler
-        */
-       Plugin.prototype.onClose = function () {
-               this.removeListeners();
-               this.editor.focus();
-               this.restoreSelection();
-               this.editor.updateToolbar();
-       };
-
-       /**
-        * Handler for window cancel
-        */
-       Plugin.prototype.onCancel = function () {
-               this.removeListeners();
-               this.dialog.close();
-               this.editor.focus();
-       };
-
-       /**
-        * Save selection
-        * Should be called after processing button other than Cancel
-        */
-       Plugin.prototype.saveSelection = function () {
-               // If IE, save the current selection
-               if (UserAgent.isIE) {
-                       this.savedRange = this.editor.getSelection().createRange();
-               }
-       };
-
-       /**
-        * Restore selection
-        * Should be called before processing dialogue button or result
-        */
-       Plugin.prototype.restoreSelection = function () {
-               // If IE, restore the selection saved when the window was shown
-               if (UserAgent.isIE && this.savedRange) {
-                               // Restoring the selection will not work if the inner html was replaced by the plugin
-                       try {
-                               this.editor.getSelection().selectRange(this.savedRange);
-                       } catch (e) {}
+                       };
                }
-       };
-
-       /**
-        * Build the configuration object of a button
-        *
-        * @param       string          button: the text of the button
-        * @param       function        handler: button handler
-        *
-        * @return      object          the button configuration object
-        */
-       Plugin.prototype.buildButtonConfig = function (button, handler) {
-               return {
-                       xtype: 'button',
-                       text: this.localize(button),
-                       listeners: {
-                               click: {
-                                       fn: handler,
-                                       scope: this
-                               }
-                       }
-               };
-       };
+       }
 
        return Plugin;
 
index a11e66a..ff13339 100644 (file)
@@ -57,15 +57,15 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util', [], function() {
                 * @return Object obj
                 */
                apply: function (object, config, defaults){
-                   if (defaults){
-                       Util.apply(object, defaults);
-                   }
-                   if (object && typeof object === 'object' && config && typeof config === 'object'){
-                       for (var property in config) {
-                           object[property] = config[property];
+                       if (defaults){
+                               Util.apply(object, defaults);
                        }
-                   }
-                   return object;
+                       if (object && typeof object === 'object' && config && typeof config === 'object'){
+                               for (var property in config) {
+                                       object[property] = config[property];
+                               }
+                       }
+                       return object;
                },
 
                /**
@@ -76,14 +76,31 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util', [], function() {
                 * @return Object object
                 */
                applyIf: function (object, config) {
-                   if (object && typeof object === 'object' && config && typeof config === 'object') {
-                       for (var property in config){
-                           if (typeof object[property] === 'undefined') {
-                               object[property] = config[property];
-                           }
+                       if (object && typeof object === 'object' && config && typeof config === 'object') {
+                               for (var property in config){
+                                       if (typeof object[property] === 'undefined') {
+                                               object[property] = config[property];
+                                       }
+                               }
                        }
-                   }
-                   return object;
+                       return object;
+               },
+
+               /**
+                * Simple inheritance
+                * subClass inherits from superClass
+                *
+                * @param Object subClass The class that inherits
+                * @param Object superClass The source of the properties
+                * @return Object the subClass
+                */
+               inherit: function (subClass, superClass) {
+                       var Construct = Util.emptyFunction;
+                       Construct.prototype = superClass.prototype;
+                       subClass.prototype = new Construct;
+                       subClass.prototype.constructor = subClass;
+                       subClass.super = superClass;
+                       return subClass;
                }
        };
 
index af479e9..82a5b61 100644 (file)
@@ -18,7 +18,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/Abbreviation',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
        function (Plugin, Util) {
 
-       var Abbreviation = Ext.extend(Plugin, {
+       var Abbreviation = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(Abbreviation, Plugin);
+       Util.apply(Abbreviation.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 3190307..22761b8 100644 (file)
  * About Plugin for TYPO3 htmlArea RTE
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/AboutEditor',
-       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin'],
-       function (Plugin) {
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, Util) {
 
-       var AboutEditor = Ext.extend(Plugin, {
+       var AboutEditor = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(AboutEditor, Plugin);
+       Util.apply(AboutEditor.prototype, {
 
                /**
                 * This function gets called by the class constructor
                 */
                configurePlugin: function(editor) {
-                       /*
+
+                       /**
                         * Registering plugin "About" information
                         */
                        var pluginInformation = {
@@ -36,7 +42,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/AboutEditor',
                                license         : 'GPL'
                        };
                        this.registerPluginInformation(pluginInformation);
-                       /*
+                       /**
                         * Registering the button
                         */
                        var buttonId = 'About';
index 7a6c835..7e0d4b2 100644 (file)
@@ -17,10 +17,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/BlockElements',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
-       function (Plugin, UserAgent, Dom, Event) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Event, Util) {
 
-       var BlockElements = Ext.extend(Plugin, {
+       var BlockElements = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(BlockElements, Plugin);
+       Util.apply(BlockElements.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 48c797a..fecef7f 100644 (file)
@@ -17,10 +17,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/BlockStyle',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/CSS/Parser'],
-       function (Plugin, Dom, Event, Parser) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/CSS/Parser',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, Dom, Event, Parser, Util) {
 
-       var BlockStyle = Ext.extend(Plugin, {
+       var BlockStyle = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(BlockStyle, Plugin);
+       Util.apply(BlockStyle.prototype, {
 
                /**
                 * This function gets called by the class constructor
index d33a7ca..668eb3c 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/CharacterMap',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
-       function (Plugin, UserAgent, Event) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Event, Util) {
 
-       var CharacterMap = Ext.extend(Plugin, {
+       var CharacterMap = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(CharacterMap, Plugin);
+       Util.apply(CharacterMap.prototype, {
 
                /**
                 * This function gets called by the class constructor
index f7a79d2..fad8d13 100644 (file)
@@ -21,7 +21,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/ContextMenu',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
        function (Plugin, UserAgent, Util, Dom, Event) {
 
-       var ContextMenu = Ext.extend(Plugin, {
+       var ContextMenu = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(ContextMenu, Plugin);
+       Util.apply(ContextMenu.prototype, {
 
                /**
                 * This function gets called by the class constructor
index aa6b8c5..55c00b5 100644 (file)
@@ -17,10 +17,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/CopyPaste',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
-       function (Plugin, UserAgent, Dom, Event) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Event, Util) {
 
-       var CopyPaste = Ext.extend(Plugin, {
+       var CopyPaste = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(CopyPaste, Plugin);
+       Util.apply(CopyPaste.prototype, {
 
                /**
                 * This function gets called by the class constructor
index b9ee3d5..721df34 100644 (file)
@@ -21,7 +21,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultClean',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
        function (Plugin, UserAgent, Util, Dom, Event) {
 
-       var DefaultClean = Ext.extend(Plugin, {
+       var DefaultClean = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(DefaultClean, Plugin);
+       Util.apply(DefaultClean.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 9db2669..2028e5d 100644 (file)
@@ -19,7 +19,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultImage',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
        function (Plugin, UserAgent, Util) {
 
-       var DefaultImage = Ext.extend(Plugin, {
+       var DefaultImage = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(DefaultImage, Plugin);
+       Util.apply(DefaultImage.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 6c1fe74..10e3561 100644 (file)
  * Default Inline Plugin for TYPO3 htmlArea RTE
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultInline',
-       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin'],
-       function (Plugin) {
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, Util) {
 
-       var DefaultInline = Ext.extend(Plugin, {
+       var DefaultInline = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(DefaultInline, Plugin);
+       Util.apply(DefaultInline.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 3997d02..ed7f7a6 100644 (file)
@@ -20,7 +20,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefaultLink',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
        function (Plugin, UserAgent, Util, Dom) {
 
-       var DefaultLink = Ext.extend(Plugin, {
+       var DefaultLink = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(DefaultLink, Plugin);
+       Util.apply(DefaultLink.prototype, {
 
                /**
                 * This function gets called by the class constructor
index b86dbd7..e946290 100644 (file)
  * DefinitionList Plugin for TYPO3 htmlArea RTE
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
-       ['TYPO3/CMS/Rtehtmlarea/Plugins/BlockElements',
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
+       'TYPO3/CMS/Rtehtmlarea/Plugins/BlockElements',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
-       function (BlockElements, UserAgent, Util, Dom) {
+       function (Plugin, BlockElements, UserAgent, Util, Dom) {
 
-       var DefinitionList = Ext.extend(BlockElements, {
+       var DefinitionList = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(DefinitionList, Plugin);
+       Util.apply(DefinitionList.prototype, {
 
                /**
                 * This function gets called by the class constructor
@@ -31,7 +36,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                         * Setting up some properties from PageTSConfig
                         */
                        this.buttonsConfiguration = this.editorConfiguration.buttons;
-                       var parentPlugin = this.getPluginInstance('BlockElements');
+                       this.parentPlugin = this.getPluginInstance('BlockElements');
+                       var parentPlugin = this.parentPlugin;
                        this.tags = parentPlugin.tags;
                        this.useClass = parentPlugin.useClass;
                        this.useBlockquote = parentPlugin.useBlockquote;
@@ -105,7 +111,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                 * @return      boolean         false if action is completed
                 */
                onButtonPress: function (editor, id, target, className) {
-                               // Could be a button or its hotkey
+                       // Could be a button or its hotkey
                        var buttonId = this.translateHotKey(id);
                        buttonId = buttonId ? buttonId : id;
                        var range = this.editor.getSelection().createRange();
@@ -122,14 +128,14 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                        if (/^(dd|dt)$/i.test(parentElement.nodeName) && this.indentDefinitionList(parentElement)) {
                                                break;
                                        } else {
-                                               DefinitionList.superclass.onButtonPress.call(this, editor, id, target, className);
+                                               this.parentPlugin.onButtonPress(editor, id, target, className);
                                        }
                                        break;
                                case 'Outdent' :
                                        if (/^(dt)$/i.test(parentElement.nodeName) && this.outdentDefinitionList()) {
                                                break;
                                        } else {
-                                               DefinitionList.superclass.onButtonPress.call(this, editor, id, target, className);
+                                               this.parentPlugin.onButtonPress(editor, id, target, className);
                                        }
                                        break;
                                case 'DefinitionList':
@@ -143,7 +149,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                        this.editor.getSelection().selectRange(this.editor.getBookMark().moveTo(bookmark));
                                        break;
                                default:
-                                       DefinitionList.superclass.onButtonPress.call(this, editor, id, target, className);
+                                       this.parentPlugin.onButtonPress(editor, id, target, className);
                        }
                        return false;
                },
@@ -189,7 +195,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                        }
                        return newNode;
                },
-               /*
+
+               /**
                 * Insert a definition list
                 */
                insertDefinitionList: function () {
@@ -209,9 +216,9 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                        endBlocks.start = this.remapNode(endBlocks.start, 'dt');
                                }
                        } else if (endBlocks.start != endBlocks.end && /^(p|h[1-6])$/i.test(endBlocks.start.nodeName)) {
-                                       // We wrap the selected elements in a dl element
+                               // We wrap the selected elements in a dl element
                                var paragraphs = endBlocks.start.nodeName.toLowerCase() === 'p';
-                               list = this.wrapSelectionInBlockElement('dl');
+                               list = this.parentPlugin.wrapSelectionInBlockElement('dl');
                                var items = list.childNodes;
                                for (var i = 0, n = items.length; i < n; ++i) {
                                        var paragraphItem = items[i].nodeName.toLowerCase() === 'p';
@@ -220,7 +227,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                        }
                        return list;
                },
-               /*
+
+               /**
                 * Indent a definition list
                 */
                indentDefinitionList: function (parentElement) {
@@ -244,9 +252,9 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                var sibling = endBlocks.start.previousSibling;
                                var bookmark = this.editor.getBookMark().get(range);
                                if (/^dd$/i.test(sibling.nodeName)) {
-                                       var list = this.wrapSelectionInBlockElement('dl');
+                                       var list = this.parentPlugin.wrapSelectionInBlockElement('dl');
                                        list = sibling.appendChild(list);
-                                               // May need to merge the list if it has a previous sibling
+                                       // May need to merge the list if it has a previous sibling
                                        if (list.previousSibling && /^dl$/i.test(list.previousSibling.nodeName)) {
                                                while (list.firstChild) {
                                                        list.previousSibling.appendChild(list.firstChild);
@@ -255,7 +263,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                        }
                                } else if (/^dt$/i.test(sibling.nodeName)) {
                                        var definition = this.editor.document.createElement('dd');
-                                       definition.appendChild(this.wrapSelectionInBlockElement('dl'));
+                                       definition.appendChild(this.parentPlugin.wrapSelectionInBlockElement('dl'));
                                        sibling.parentNode.insertBefore(definition, sibling.nextSibling);
                                }
                                this.editor.getSelection().selectRange(this.editor.getBookMark().moveTo(bookmark));
@@ -263,7 +271,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                        }
                        return false;
                },
-               /*
+
+               /**
                 * Outdent a definition list
                 */
                outdentDefinitionList: function () {
@@ -278,7 +287,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                if (this.editor.getSelection().isEmpty()) {
                                        dd.parentNode.insertBefore(endBlocks.start, dd.nextSibling);
                                } else {
-                                       var selected = this.wrapSelectionInBlockElement('dl');
+                                       var selected = this.parentPlugin.wrapSelectionInBlockElement('dl');
                                        while (selected.lastChild) {
                                                dd.parentNode.insertBefore(selected.lastChild, dd.nextSibling);
                                        }
@@ -315,18 +324,18 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/DefinitionList',
                                                                        && !endBlocks.end.nextSibling) {
                                                                button.setDisabled(false);
                                                        } else {
-                                                               DefinitionList.superclass.onUpdateToolbar.call(this, button, mode, selectionEmpty, ancestors);
+                                                               this.parentPlugin.onUpdateToolbar(button, mode, selectionEmpty, ancestors);
                                                        }
                                                        break;
                                                case 'DefinitionList':
                                                        button.setDisabled(!(selectionEmpty && /^(p|div|address|pre|blockquote|h[1-6]|li|td|dd)$/i.test(endBlocks.start.nodeName))
-                                                                                                               && !(endBlocks.start != endBlocks.end && /^(p|h[1-6])$/i.test(endBlocks.start.nodeName)));
+                                                                               && !(endBlocks.start != endBlocks.end && /^(p|h[1-6])$/i.test(endBlocks.start.nodeName)));
                                                        break;
                                        }
                                } else {
                                        switch (button.itemId) {
                                                case 'Outdent':
-                                                       DefinitionList.superclass.onUpdateToolbar.call(this, button, mode, selectionEmpty, ancestors);
+                                                       this.parentPlugin.onUpdateToolbar(button, mode, selectionEmpty, ancestors);
                                                        break;
                                        }
                                }
index 62e9146..3579233 100644 (file)
@@ -23,7 +23,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/EditElement',
        'TYPO3/CMS/Rtehtmlarea/Plugins/TextStyle'],
        function (Plugin, Util, Dom, MicrodataSchema, Language, BlockStyle, TextStyle) {
 
-       var EditElement= Ext.extend(Plugin, {
+       var EditElement = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(EditElement, Plugin);
+       Util.apply(EditElement.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 0791a7b..f99ccc7 100644 (file)
  * EditorMode Plugin for TYPO3 htmlArea RTE
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/EditorMode',
-       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin'],
-       function (Plugin) {
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, Util) {
 
-       var EditorMode = Ext.extend(Plugin, {
+       var EditorMode = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(EditorMode, Plugin);
+       Util.apply(EditorMode.prototype, {
 
                /**
                 * This function gets called by the class constructor
index ca0d917..42934c8 100644 (file)
  * Find and Replace Plugin for TYPO3 htmlArea RTE
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/FindReplace',
-       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin'],
-       function (Plugin) {
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, Util) {
 
-       var FindReplace = Ext.extend(Plugin, {
+       var FindReplace = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(FindReplace, Plugin);
+       Util.apply(FindReplace.prototype, {
 
                /**
                 * This function gets called by the class constructor
@@ -481,7 +486,8 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/FindReplace',
                        this.replaces = 0;
                        this.spans = new Array();
                },
-               /*
+
+               /**
                 * Clear the document before leaving on 'Done' button
                 */
                onCancel: function () {
@@ -490,7 +496,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/FindReplace',
                        if (plugin) {
                                plugin.start();
                        }
-                       FindReplace.superclass.onCancel.call(this);
+                       FindReplace.super.prototype.onCancel.call(this);
                },
 
                /**
@@ -502,7 +508,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/FindReplace',
                        if (plugin) {
                                plugin.start();
                        }
-                       FindReplace.superclass.onClose.call(this);
+                       FindReplace.super.prototype.onClose.call(this);
                }
        });
 
index bcf8c76..9fdee4c 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/InlineElements',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
-       function (Plugin, UserAgent, Dom) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Util) {
 
-       var InlineElements = Ext.extend(Plugin, {
+       var InlineElements = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(InlineElements, Plugin);
+       Util.apply(InlineElements.prototype, {
 
                /**
                 * This function gets called by the base constructor
index 11e71ca..477d9d9 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/InsertSmiley',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
-       function (Plugin, UserAgent, Event) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Event, Util) {
 
-       var InsertSmiley = Ext.extend(Plugin, {
+       var InsertSmiley = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(InsertSmiley, Plugin);
+       Util.apply(InsertSmiley.prototype, {
 
                /**
                 * This function gets called by the class constructor
index e45d25c..a99424c 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/Language',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
-       function (Plugin, UserAgent, Dom) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Util) {
 
-       var Language = Ext.extend(Plugin, {
+       var Language = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(Language, Plugin);
+       Util.apply(Language.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 98101f9..717f0bd 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/MicrodataSchema',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
-       function (Plugin, UserAgent, Dom) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Util) {
 
-       var MicrodataSchema = Ext.extend(Plugin, {
+       var MicrodataSchema = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(MicrodataSchema, Plugin);
+       Util.apply(MicrodataSchema.prototype, {
 
                /**
                 * This function gets called by the class constructor
index d1517de..36f59c4 100644 (file)
@@ -18,10 +18,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/PlainText',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Walker'],
-       function (Plugin, UserAgent, Dom, Event, Walker) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/Walker',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Event, Walker, Util) {
 
-       var PlainText = Ext.extend(Plugin, {
+       var PlainText = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(PlainText, Plugin);
+       Util.apply(PlainText.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 0dfbd5e..d88b6e1 100644 (file)
@@ -19,7 +19,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/QuickTag',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Extjs/ux/ColorPaletteField'],
        function (Plugin, Util, ColorPaletteField) {
 
-       var QuickTag = Ext.extend(Plugin, {
+       var QuickTag = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(QuickTag, Plugin);
+       Util.apply(QuickTag.prototype, {
 
                /**
                 * This function gets called by the class constructor
index ef9b2e0..86ac780 100644 (file)
  * Remove Format Plugin for TYPO3 htmlArea RTE
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/RemoveFormat',
-       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin'],
-       function (Plugin) {
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, Util) {
 
-       var RemoveFormat = Ext.extend(Plugin, {
+       var RemoveFormat = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(RemoveFormat, Plugin);
+       Util.apply(RemoveFormat.prototype, {
 
                /**
                 * This function gets called by the class constructor
index d234790..11aa534 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/SelectFont',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
-       function (Plugin, UserAgent, Dom) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Util) {
 
-       var SelectFont = Ext.extend(Plugin, {
+       var SelectFont = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(SelectFont, Plugin);
+       Util.apply(SelectFont.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 7080504..774d7d4 100644 (file)
@@ -20,7 +20,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/SpellChecker',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
        function (Plugin, UserAgent, Util, Dom) {
 
-       var SpellChecker = Ext.extend(Plugin, {
+       var SpellChecker = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(SpellChecker, Plugin);
+       Util.apply(SpellChecker.prototype, {
 
                /**
                 * This function gets called by the class constructor
@@ -448,7 +452,7 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/SpellChecker',
                                });
                                return false;
                        } else {
-                               return HTMLArea.SpellChecker.superclass.onCancel.call(this);
+                               return SpellChecker.super.prototype.onCancel.call(this);
                        }
                },
 
index 703c51c..afe545b 100644 (file)
@@ -18,10 +18,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Color',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Color',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Extjs/ColorPalette'],
-       function (Plugin, UserAgent, Dom, Color, ColorPalette) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Extjs/ColorPalette',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Color, ColorPalette, Util) {
 
-       var TYPO3Color = Ext.extend(Plugin, {
+       var TYPO3Color = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(TYPO3Color, Plugin);
+       Util.apply(TYPO3Color.prototype, {
 
                /**
                 * This function gets called by the class constructor
index f1c2ddf..20849dd 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3HtmlParser',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
-       function (Plugin, UserAgent, Event) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Event, Util) {
 
-       var TYPO3HtmlParser = Ext.extend(Plugin, {
+       var TYPO3HtmlParser = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(TYPO3HtmlParser, Plugin);
+       Util.apply(TYPO3HtmlParser.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 4368e00..71cdb93 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Image',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'],
-       function (Plugin, UserAgent, Event) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Event, Util) {
 
-       var TYPO3Image = Ext.extend(Plugin, {
+       var TYPO3Image = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(TYPO3Image, Plugin);
+       Util.apply(TYPO3Image.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 6e15ec1..3d13577 100644 (file)
 define('TYPO3/CMS/Rtehtmlarea/Plugins/TYPO3Link',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM'],
-       function (Plugin, UserAgent, Dom) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Util) {
 
-       var TYPO3Link = Ext.extend(Plugin, {
+       var TYPO3Link = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(TYPO3Link, Plugin);
+       Util.apply(TYPO3Link.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 36238e3..3af4037 100644 (file)
@@ -26,7 +26,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TableOperations',
        'TYPO3/CMS/Rtehtmlarea/Plugins/Language'],
        function (Plugin, UserAgent, Util, Dom, Event, Color, ColorPaletteField, BlockStyle, BlockElements, Language) {
 
-       var TableOperations = Ext.extend(Plugin, {
+       var TableOperations = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(TableOperations, Plugin);
+       Util.apply(TableOperations.prototype, {
 
                /**
                 * This function gets called by the class constructor
index fca9583..a98b264 100644 (file)
@@ -17,10 +17,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TextIndicator',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Color'],
-       function (Plugin, UserAgent, Event, Color) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Color',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Event, Color, Util) {
 
-       var TextIndicator = Ext.extend(Plugin, {
+       var TextIndicator = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(TextIndicator, Plugin);
+       Util.apply(TextIndicator.prototype, {
 
                /**
                 * This function gets called by the class constructor
index 95e64f3..4efe75d 100644 (file)
@@ -18,10 +18,15 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/TextStyle',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/DOM/DOM',
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/CSS/Parser'],
-       function (Plugin, UserAgent, Dom, Event, Parser) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/CSS/Parser',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Dom, Event, Parser, Util) {
 
-       var TextStyle = Ext.extend(Plugin, {
+       var TextStyle = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(TextStyle, Plugin);
+       Util.apply(TextStyle.prototype, {
 
                /**
                 * This function gets called by the class constructor
index fdaf1d5..7636c28 100644 (file)
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/UndoRedo',
        ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
-       'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent'],
-       function (Plugin, UserAgent) {
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, UserAgent, Util) {
 
-       var UndoRedo = Ext.extend(Plugin, {
+       var UndoRedo = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(UndoRedo, Plugin);
+       Util.apply(UndoRedo.prototype, {
 
                /**
                 * This function gets called by the class constructor
index f23ee5b..980f02c 100644 (file)
  * User Elements Plugin for TYPO3 htmlArea RTE
  */
 define('TYPO3/CMS/Rtehtmlarea/Plugins/UserElements',
-       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin'],
-       function (Plugin) {
+       ['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
+       'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'],
+       function (Plugin, Util) {
 
-       var UserElements = Ext.extend(Plugin, {
+       var UserElements = function (editor, pluginName) {
+               this.constructor.super.call(this, editor, pluginName);
+       };
+       Util.inherit(UserElements, Plugin);
+       Util.apply(UserElements.prototype, {
 
                /**
                 * This function gets called by the class constructor