* Feature/cleanup: Restructure plugins QuickTag, TableOperations, UserElements
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 29 Jan 2008 23:01:39 +0000 (23:01 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 29 Jan 2008 23:01:39 +0000 (23:01 +0000)
* Feature/cleanup: Move colors, fonts, text direction, word cleaning and lists to extensions/plugins.

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2975 709f56b5-9817-0410-a4d7-c38de5d9e867

94 files changed:
ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
typo3/sysext/rtehtmlarea/doc/manual.sxw
typo3/sysext/rtehtmlarea/ext_localconf.php
typo3/sysext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php
typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/htmlarea.css
typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertOrderedList.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertUnorderedList.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/CharacterMap/class.tx_rtehtmlarea_charactermap.php
typo3/sysext/rtehtmlarea/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/DefaultColor/class.tx_rtehtmlarea_defaultcolor.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/DefaultColor/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/forecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/hilitecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/DefaultFont/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/Language/skin/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/Language/skin/images/left_to_right.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/Language/skin/images/right_to_left.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/QuickTag/class.tx_rtehtmlarea_quicktag.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/QuickTag/skin/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/QuickTag/skin/images/inserttag.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TYPO3Color/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/forecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/hilitecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-merge.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/insert_table.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-above.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-under.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/table-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/toggle-borders.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/UserElements/class.tx_rtehtmlarea_userelements.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/UserElements/skin/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/extensions/UserElements/skin/images/user.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/locallang.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/ContextMenu/context-menu.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/default-color.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/popups/select_color.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultFont/default-font.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultFont/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/locallang.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DynamicCSS/dynamiccss.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineCSS/inlinecss.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/insert-smiley.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/popups/quicktag.html
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/locallang.xml [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/locallang.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Image/typo3image.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/popups/insert_table.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/UserElements/user-elements.js
typo3/sysext/rtehtmlarea/htmlarea/popupwin.js
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_dam_browse_links.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_dam_browse_media.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php
typo3/sysext/rtehtmlarea/mod5/class.tx_rtehtmlarea_user.php
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php

index a019d03..1f43b96 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-29  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
+
+       * Feature/cleanup: Restructure plugins QuickTag, TableOperations, UserElements
+       * Feature/cleanup: Move colors, fonts, text direction, word cleaning and lists to extensions/plugins.
+
 2008-01-28  Kasper Sk\8crh¿j <kasper2008@typo3.com>
 
        * (minor) Fixed bug: "typo3/js/workspaces.js" was corrected to "js/workspaces.js" in class.workspaceselector.php
index 72362fa..8bbc99c 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-29  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
+
+       * Feature/cleanup: Restructure plugins QuickTag, TableOperations, UserElements
+       * Feature/cleanup: Move colors, fonts, text direction, word cleaning and lists to extensions/plugins.
+
 2008-01-26  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
        * Feature/cleanup: Restructure plugins FindReplace, InsertSmiley, RemoveFormat, SpellChecker, AboutEditor
index 4676e9c..ed36c4c 100644 (file)
@@ -92,101 +92,24 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
 
                // Conversion array: TYPO3 button names to htmlArea button names
        var $convertToolbarForHtmlAreaArray = array (
-                       // 'TYPO3 name' => 'htmlArea name'
-               'fontstyle'             => 'FontName',
-               'fontsize'              => 'FontSize',
-               'textcolor'             => 'ForeColor',
-               'bgcolor'               => 'HiliteColor',
-               'orderedlist'           => 'InsertOrderedList',
-               'unorderedlist'         => 'InsertUnorderedList',
                'line'                  => 'InsertHorizontalRule',
-               'table'                 => 'InsertTable',
                'cut'                   => 'Cut',
                'copy'                  => 'Copy',
                'paste'                 => 'Paste',
                'chMode'                => 'HtmlMode',
-               'user'                  => 'UserElements',
-               
-                       // htmlArea extra buttons
-               'lefttoright'           => 'LeftToRight',
-               'righttoleft'           => 'RightToLeft',
                'showhelp'              => 'ShowHelp',
-               'inserttag'             => 'InsertTag',
-               'splitblock'            => 'SplitBlock',
-               'toggleborders'         => 'TO-toggle-borders',
-               'tableproperties'       => 'TO-table-prop',
-               'rowproperties'         => 'TO-row-prop',
-               'rowinsertabove'        => 'TO-row-insert-above',
-               'rowinsertunder'        => 'TO-row-insert-under',
-               'rowdelete'             => 'TO-row-delete',
-               'rowsplit'              => 'TO-row-split',
-               'columninsertbefore'    => 'TO-col-insert-before',
-               'columninsertafter'     => 'TO-col-insert-after',
-               'columndelete'          => 'TO-col-delete',
-               'columnsplit'           => 'TO-col-split',
-               'cellproperties'        => 'TO-cell-prop',
-               'cellinsertbefore'      => 'TO-cell-insert-before',
-               'cellinsertafter'       => 'TO-cell-insert-after',
-               'celldelete'            => 'TO-cell-delete',
-               'cellsplit'             => 'TO-cell-split',
-               'cellmerge'             => 'TO-cell-merge',
-
-                       // Toolbar formating
+               'textindicator'         => 'TextIndicator',
                'space'                 => 'space',
                'bar'                   => 'separator',
                'linebreak'             => 'linebreak',
-
-                       // Always show
                'undo'                  => 'Undo',
                'redo'                  => 'Redo',
-               'textindicator'         => 'TextIndicator',
-               );
-       
-       var $defaultFontFaces = array(
-               'Arial'                 => 'Arial,sans-serif',
-               'Arial Black'           => 'Arial Black,sans-serif',
-               'Verdana'               => 'Verdana,Arial,sans-serif',
-               'Times New Roman'       => 'Times New Roman,Times,serif',
-               'Garamond'              => 'Garamond',
-               'Lucida Handwriting'    => 'Lucida Handwriting',
-               'Courier'               => 'Courier',
-               'Webdings'              => 'Webdings',
-               'Wingdings'             => 'Wingdings',
-               );
-                               
-       var $defaultFontSizes = array(
-               '1'     =>      '1 (8 pt)',
-               '2'     =>      '2 (10 pt)',
-               '3'     =>      '3 (12 pt)',
-               '4'     =>      '4 (14 pt)',
-               '5'     =>      '5 (18 pt)',
-               '6'     =>      '6 (24 pt)',
-               '7'     =>      '7 (36 pt)',
                );
        
-       var $defaultFontSizes_safari = array(
-               '1'     =>      'x-small (10px)',
-               '2'     =>      'small (13px)',
-               '3'     =>      'medium (16px)',
-               '4'     =>      'large (18px)',
-               '5'     =>      'x-large (24px)',
-               '6'     =>      'xx-large (32px)',
-               '7'     =>      'xxx-large (48px)',
-               );
-       
-       var $pluginList = 'TableOperations, ContextMenu, SelectColor, QuickTag, UserElements, TYPO3HtmlParser';
-       
-       var $pluginButton = array(
-               'QuickTag'              => 'inserttag',
-               'TableOperations'       => 'table, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit,
-                                               columninsertbefore, columninsertafter, columndelete, columnsplit,
-                                               cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge',
-               'UserElements'          => 'user',
-               'SelectColor'           => 'textcolor,bgcolor',
-               );
-
+       var $pluginList = 'ContextMenu';
+       var $pluginButton = array();
        var $pluginLabel = array();
-
+       
                // External:
        var $RTEdivStyle;                       // Alternative style for RTE <div> tag.
        var $extHttpPath;                       // full Path to this extension for http (so no Server path). It ends with "/"
@@ -222,7 +145,6 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
        var $BECharset;
        var $OutputCharset;
        var $editorCSS;
-       var $quickTagHideTags;
        var $specConf;
        var $toolbar = array();                                 // Save the buttons for the toolbar
        var $toolbar_level_size;                                // The size for each level in the toolbar:
@@ -421,7 +343,6 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        }
                        if ($this->client['BROWSER'] == 'opera') {
                                $hidePlugins[] = 'ContextMenu';
-                               $this->thisConfig['hideTableOperationsInToolbar'] = 0;
                                $this->thisConfig['keepButtonGroupTogether'] = 0;
                        }
                        if ($this->client['BROWSER'] == 'gecko' && $this->client['VERSION'] == '1.3')  {
@@ -749,9 +670,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                                $hidePlugins[] = $pluginId;
                        }
                }
-               if($this->thisConfig['disableContextMenu'] || $this->thisConfig['disableRightClick']) $hidePlugins[] = 'ContextMenu';
-               if($this->thisConfig['disableSelectColor']) $hidePlugins[] = 'SelectColor';
-               if(!$this->thisConfig['enableWordClean'] || !is_array($this->thisConfig['enableWordClean.'])) $hidePlugins[] = 'TYPO3HtmlParser';
+               if ($this->thisConfig['disableContextMenu'] || $this->thisConfig['disableRightClick']) $hidePlugins[] = 'ContextMenu';
                $this->pluginEnabledArray = array_diff($this->pluginEnabledArray, $hidePlugins);
                
                        // Hiding labels of disabled plugins
@@ -768,11 +687,6 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                                $this->convertToolbarForHtmlAreaArray = array_unique(array_merge($this->convertToolbarForHtmlAreaArray, $plugin->getConvertToolbarForHtmlAreaArray()));
                        }
                }
-                       // Renaming buttons of replacement plugins
-               if( $this->isPluginEnabled('SelectColor') ) {
-                       $this->convertToolbarForHtmlAreaArray['textcolor'] = 'CO-forecolor';
-                       $this->convertToolbarForHtmlAreaArray['bgcolor'] = 'CO-hilitecolor';
-               }
        }
 
        /**
@@ -866,9 +780,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                }
                return (!$this->is_FE() ? '' : '
                ' . '/*<![CDATA[*/') . ($this->is_FE() ? '' : '
-                       RTEarea[0]["RTEtsConfigParams"] = "&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams()) . '";
-                       RTEarea[0]["pathUserModule"] = "../../mod5/user.php";
-                       RTEarea[0]["pathParseHtmlModule"] = "' . $this->extHttpPath . 'mod6/parse_html.php";')
+                       RTEarea[0]["RTEtsConfigParams"] = "&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams()) . '";')
                        . $loadPluginCode .  '
                        HTMLArea.init();' . (!$this->is_FE() ? '' : '
                /*]]>*/
@@ -891,10 +803,10 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                $configureRTEInJavascriptString = (!$this->is_FE() ? '' : '
                        ' . '/*<![CDATA[*/') . '
                        RTEarea['.$RTEcounter.'] = new Object();
-                       RTEarea['.$RTEcounter.']["RTEtsConfigParams"] = "&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams()) . '";
-                       RTEarea['.$RTEcounter.']["number"] = '.$RTEcounter.';
-                       RTEarea['.$RTEcounter.']["id"] = "RTEarea'.$RTEcounter.'";
-                       RTEarea['.$RTEcounter.']["enableWordClean"] = ' . (trim($this->thisConfig['enableWordClean'])?'true':'false') . ';
+                       RTEarea['.$RTEcounter.'].RTEtsConfigParams = "&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams()) . '";
+                       RTEarea['.$RTEcounter.'].number = '.$RTEcounter.';
+                       RTEarea['.$RTEcounter.'].id = "RTEarea'.$RTEcounter.'";
+                       RTEarea['.$RTEcounter.'].enableWordClean = ' . (trim($this->thisConfig['enableWordClean'])?'true':'false') . ';
                        RTEarea['.$RTEcounter.']["htmlRemoveComments"] = ' . (trim($this->thisConfig['removeComments'])?'true':'false') . ';
                        RTEarea['.$RTEcounter.']["disableEnterParagraphs"] = ' . (trim($this->thisConfig['disableEnterParagraphs'])?'true':'false') . ';
                        RTEarea['.$RTEcounter.']["removeTrailingBR"] = ' . (trim($this->thisConfig['removeTrailingBR'])?'true':'false') . ';
@@ -910,30 +822,30 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        // The following properties apply only to the backend
                if (!$this->is_FE()) {
                        $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["sys_language_content"] = "' . $this->contentLanguageUid . '";
-                       RTEarea['.$RTEcounter.']["typo3ContentLanguage"] = "' . $this->contentTypo3Language . '";
-                       RTEarea['.$RTEcounter.']["typo3ContentCharset"] = "' . $this->contentCharset . '";
-                       RTEarea['.$RTEcounter.']["userUid"] = "' . $this->userUid . '";';
+                       RTEarea['.$RTEcounter.'].sys_language_content = "' . $this->contentLanguageUid . '";
+                       RTEarea['.$RTEcounter.'].typo3ContentLanguage = "' . $this->contentTypo3Language . '";
+                       RTEarea['.$RTEcounter.'].typo3ContentCharset = "' . $this->contentCharset . '";
+                       RTEarea['.$RTEcounter.'].userUid = "' . $this->userUid . '";';
                }
                
                        // Setting the plugin flags
                $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["plugin"] = new Object();';
+                       RTEarea['.$RTEcounter.'].plugin = new Object();';
                foreach ($this->pluginEnabledArray as $pluginId) {
                        $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["plugin"]["'.$pluginId.'"] = true;';
+                       RTEarea['.$RTEcounter.'].plugin.'.$pluginId.' = true;';
                }
                
                        // Setting the buttons configuration
                $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["buttons"] = new Object();';
+                       RTEarea['.$RTEcounter.'].buttons = new Object();';
                if (is_array($this->thisConfig['buttons.'])) {
                        foreach ($this->thisConfig['buttons.'] as $buttonIndex => $conf) {
                                $button = substr($buttonIndex, 0, -1);
                                if (in_array($button,$this->toolbar)) {
                                        $indexButton = 0;
                                        $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["buttons"]["'.$button.'"] = {';
+                       RTEarea['.$RTEcounter.'].buttons.'.$button.' = {';
                                        if (is_array($conf)) {
                                                foreach ($conf as $propertyName => $conf1) {
                                                        $property = $propertyName;
@@ -996,18 +908,6 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        }
                }
                
-                       // Deprecated inserttag button configuration
-               if (in_array('inserttag', $this->toolbar) && trim($this->thisConfig['hideTags'])) {
-                       if (!is_array($this->thisConfig['buttons.']['inserttag.'])) {
-                               $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["buttons"]["inserttag"] = new Object();
-                       RTEarea['.$RTEcounter.']["buttons"]["inserttag"]["denyTags"] = "'.implode(',', t3lib_div::trimExplode(',', $this->thisConfig['hideTags'], 1)).'";';
-                       } elseif (!$this->thisConfig['buttons.']['inserttag.']['denyTags']) {
-                               $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["buttons"]["inserttag"]["denyTags"] = "'.implode(',', t3lib_div::trimExplode(',', $this->thisConfig['hideTags'], 1)).'";';
-                       }
-               }
-               
                        // Setting the list of tags to be removed if specified in the RTE config
                if (trim($this->thisConfig['removeTags']))  {
                        $configureRTEInJavascriptString .= '
@@ -1022,17 +922,12 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                
                        // Process default style configuration
                $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["defaultPageStyle"] = "' . $this->hostURL . $this->writeTemporaryFile('', 'defaultPageStyle', 'css', $this->buildStyleSheet()) . '";';
+                       RTEarea['.$RTEcounter.'].defaultPageStyle = "' . $this->hostURL . $this->writeTemporaryFile('', 'defaultPageStyle', 'css', $this->buildStyleSheet()) . '";';
                        
                        // Setting the pageStyle
                $filename = trim($this->thisConfig['contentCSS']) ? trim($this->thisConfig['contentCSS']) : 'EXT:' . $this->ID . '/res/contentcss/default.css';
                $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["pageStyle"] = "' . $this->getFullFileName($filename) .'";';
-               
-                       // Process colors configuration
-               if ( $this->isPluginEnabled('SelectColor') ) {
-                       $configureRTEInJavascriptString .= $this->buildJSColorsConfig($RTEcounter);
-               }
+                       RTEarea['.$RTEcounter.'].pageStyle = "' . $this->getFullFileName($filename) .'";';
                
                        // Process classes configuration
                $classesConfigurationRequired = false;
@@ -1045,37 +940,6 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        $configureRTEInJavascriptString .= $this->buildJSClassesConfig($RTEcounter);
                }
                
-                       // Process font faces configuration
-               if (in_array('fontstyle',$this->toolbar)) {
-                       $configureRTEInJavascriptString .= $this->buildJSFontFacesConfig($RTEcounter);
-               }
-               
-                       // Process font sizes configuration
-               if (in_array('fontsize',$this->toolbar)) {
-                       $configureRTEInJavascriptString .= $this->buildJSFontSizesConfig($RTEcounter);
-               }
-               
-               if ($this->isPluginEnabled('TableOperations')) {
-                       $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["hideTableOperationsInToolbar"] = ' . (trim($this->thisConfig['hideTableOperationsInToolbar']) ? 'true' : 'false') . ';
-                       RTEarea['.$RTEcounter.']["disableLayoutFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableLayoutFieldsetInTableOperations'])?'true':'false') . ';
-                       RTEarea['.$RTEcounter.']["disableAlignmentFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableAlignmentFieldsetInTableOperations'])?'true':'false') . ';
-                       RTEarea['.$RTEcounter.']["disableSpacingFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableSpacingFieldsetInTableOperations'])?'true':'false') . ';
-                       RTEarea['.$RTEcounter.']["disableBordersFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableBordersFieldsetInTableOperations'])?'true':'false') . ';
-                       RTEarea['.$RTEcounter.']["disableColorFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableColorFieldsetInTableOperations'])?'true':'false') . ';';
-                               // // Deprecated toggleborders button configuration
-                       if (in_array('toggleborders',$this->toolbar) && $this->thisConfig['keepToggleBordersInToolbar']) {
-                               if (!is_array($this->thisConfig['buttons.']['toggleborders.'])) {
-                                       $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["buttons"]["toggleborders"] = new Object();
-                       RTEarea['.$RTEcounter.']["buttons"]["toggleborders"]["keepInToolbar"] = true;';
-                               } elseif (!$this->thisConfig['buttons.']['toggleborders.']['keepInToolbar']) {
-                                       $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["buttons"]["toggleborders"]["keepInToolbar"] = true;';
-                               }
-                       }
-               }
-               
                        // Add Javascript configuration for registered plugins
                foreach ($this->registeredPlugins as $pluginId => $plugin) {
                        if ($this->isPluginEnabled($pluginId)) {
@@ -1084,7 +948,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                }
                
                $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["toolbar"] = '.$this->getJSToolbarArray().';
+                       RTEarea['.$RTEcounter.'].toolbar = '.$this->getJSToolbarArray().';
                        HTMLArea.initEditor('.$RTEcounter.');' . (!$this->is_FE() ? '' : '
                        /*]]>*/');
                return $configureRTEInJavascriptString;
@@ -1102,191 +966,6 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                return in_array($pluginId, $this->pluginEnabledArray);
        }
        
-       
-       /**
-        * Return Javascript configuration of font sizes
-        *
-        * @param       integer         $RTEcounter: The index number of the current RTE editing area within the form.
-        *
-        * @return      string          Javascript font sizes configuration
-        */
-       function buildJSFontSizesConfig($RTEcounter) {
-               global $LANG, $TSFE;
-               $configureRTEInJavascriptString = '';
-               
-                       // Builing JS array of default font sizes
-               $HTMLAreaFontSizes = array();
-               if ($this->is_FE()) {
-                       $HTMLAreaFontSizes[0] = $TSFE->csConvObj->conv($TSFE->getLLL('No size',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset);
-               } else {
-                       $HTMLAreaFontSizes[0] = $LANG->getLL('No size');
-               }
-               
-               foreach ($this->defaultFontSizes as $FontSizeItem => $FontSizeLabel) {
-                       if ($this->client['BROWSER'] == 'safari') {
-                               $HTMLAreaFontSizes[$FontSizeItem] = $this->defaultFontSizes_safari[$FontSizeItem];
-                       } else {
-                               $HTMLAreaFontSizes[$FontSizeItem] = $FontSizeLabel;
-                       }
-               }
-               if ($this->thisConfig['hideFontSizes'] ) {
-                       $hideFontSizes =  t3lib_div::trimExplode(',', $this->cleanList($this->thisConfig['hideFontSizes']), 1);
-                       foreach ($hideFontSizes as $item)  {
-                               if ($HTMLAreaFontSizes[strtolower($item)]) {
-                                       unset($HTMLAreaFontSizes[strtolower($item)]);
-                               }
-                       }
-               }
-               
-               $HTMLAreaJSFontSize = '{';
-               if ($this->cleanList($this->thisConfig['hideFontSizes']) != '*') {
-                       $HTMLAreaFontSizeIndex = 0;
-                       foreach ($HTMLAreaFontSizes as $FontSizeItem => $FontSizeLabel) {
-                               if($HTMLAreaFontSizeIndex) { 
-                                       $HTMLAreaJSFontSize .= ',';
-                               }
-                               $HTMLAreaJSFontSize .= '
-                               "' . $FontSizeLabel . '" : "' . ($FontSizeItem?$FontSizeItem:'') . '"';
-                               $HTMLAreaFontSizeIndex++;
-                       }
-               }
-               $HTMLAreaJSFontSize .= '};';
-               $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["fontsize"] = '. $HTMLAreaJSFontSize;
-                       
-               return $configureRTEInJavascriptString;
-       }
-       
-       /**
-        * Return Javascript configuration of font faces
-        *
-        * @param       integer         $RTEcounter: The index number of the current RTE editing area within the form.
-        *
-        * @return      string          Javascript configuration of font faces
-        */
-       function buildJSFontfacesConfig($RTEcounter) {
-               global $TSFE, $LANG;
-               
-               if ($this->is_FE()) {
-                       $RTEProperties = $this->RTEsetup;
-               } else {
-                       $RTEProperties = $this->RTEsetup['properties'];
-               }
-               
-               $configureRTEInJavascriptString = '';
-               
-                       // Builing JS array of default font faces
-               $HTMLAreaFontname = array();
-               $HTMLAreaFontname['nofont'] = '
-                               "' . $fontName . '" : "' . $this->cleanList($fontValue) . '"';
-               $defaultFontFacesList = 'nofont,';
-               if ($this->is_FE()) {
-                       $HTMLAreaFontname['nofont'] = '
-                               "' . $TSFE->csConvObj->conv($TSFE->getLLL('No font',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset) . '" : ""';
-               } else {
-                       $HTMLAreaFontname['nofont'] = '
-                               "' . $LANG->getLL('No font') . '" : ""';
-               }
-               
-               $hideFontFaces = $this->cleanList($this->thisConfig['hideFontFaces']);
-               if ($hideFontFaces != '*') {
-                       $index = 0;
-                       foreach ($this->defaultFontFaces as $fontName => $fontValue) {
-                               if (!t3lib_div::inList($hideFontFaces, $index+1)) {
-                                       $HTMLAreaFontname[$fontName] = '
-                               "' . $fontName . '" : "' . $this->cleanList($fontValue) . '"';
-                                       $defaultFontFacesList .= $fontName . ',';
-                               }
-                               $index++;
-                       }
-               }
-               
-                       // Adding configured font faces
-               if (is_array($RTEProperties['fonts.'])) {
-                       foreach ($RTEProperties['fonts.'] as $fontName => $conf) {
-                               $fontName = substr($fontName,0,-1);
-                               $fontLabel = $this->getPageConfigLabel($conf['name'],0);
-                               $HTMLAreaFontname[$fontName] = '
-                               "' . $fontLabel . '" : "' . $this->cleanList($conf['value']) . '"';
-                       }
-               }
-               
-                       // Setting the list of font faces
-               $HTMLAreaJSFontface = '{';
-               $HTMLAreaFontface = t3lib_div::trimExplode(',' , $this->cleanList($defaultFontFacesList . ',' . $this->thisConfig['fontFace']));
-               $HTMLAreaFontfaceIndex = 0;
-               foreach ($HTMLAreaFontface as $fontName) {
-                       if($HTMLAreaFontfaceIndex) { 
-                               $HTMLAreaJSFontface .= ',';
-                       }
-                       $HTMLAreaJSFontface .= $HTMLAreaFontname[$fontName];
-                       $HTMLAreaFontfaceIndex++;
-               }
-               $HTMLAreaJSFontface .= '};';
-               
-               $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["fontname"] = '. $HTMLAreaJSFontface;
-               
-               return $configureRTEInJavascriptString;
-       }
-       
-       /**
-        * Return Javascript configuration of colors
-        *
-        * @param       integer         $RTEcounter: The index number of the current RTE editing area within the form.
-        *
-        * @return      string          Javascript configuration of colors
-        */
-       function buildJSColorsConfig($RTEcounter) {
-               global $TSFE, $LANG;
-               
-               if ($this->is_FE()) {
-                       $RTEProperties = $this->RTEsetup;
-               } else {
-                       $RTEProperties = $this->RTEsetup['properties'];
-               }
-               
-               $configureRTEInJavascriptString = '';
-               
-               if(trim($this->thisConfig['disableColorPicker'])) {
-                       $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["disableColorPicker"] = true;';
-               } else {
-                       $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["disableColorPicker"] = false;';
-               }
-               
-                       // Building JS array of configured colors
-               if (is_array($RTEProperties['colors.']) )  {
-                       $HTMLAreaColorname = array();
-                       foreach ($RTEProperties['colors.'] as $colorName => $conf) {
-                               $colorName=substr($colorName,0,-1);
-                               $colorLabel = $this->getPageConfigLabel($conf['name']);
-                               $HTMLAreaColorname[$colorName] = '
-                               [' . $colorLabel . ' , "' . $conf['value'] . '"]';
-                       }
-               }
-               
-                       // Setting the list of colors if specified in the RTE config
-               if ($this->thisConfig['colors'] ) {
-                       $HTMLAreaJSColors = '[';
-                       $HTMLAreaColors = t3lib_div::trimExplode(',' , $this->cleanList($this->thisConfig['colors']));
-                       $HTMLAreaColorsIndex = 0;
-                       foreach ($HTMLAreaColors as $colorName) {
-                               if($HTMLAreaColorsIndex && $HTMLAreaColorname[$colorName]) { 
-                                       $HTMLAreaJSColors .= ',';
-                               }
-                               $HTMLAreaJSColors .= $HTMLAreaColorname[$colorName];
-                               $HTMLAreaColorsIndex++;
-                       }
-                       $HTMLAreaJSColors .= '];';
-                       $configureRTEInJavascriptString .= '
-                       RTEarea['.$RTEcounter.']["colors"] = '. $HTMLAreaJSColors;
-               }
-               
-               return $configureRTEInJavascriptString;
-       }
-       
        /**
         * Build the default content style sheet
         *
@@ -1649,7 +1328,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                return $LLString;
        }
        
-       function getPageConfigLabel($string,$JScharCode=1) {
+       public function getPageConfigLabel($string,$JScharCode=1) {
                global $LANG, $TSFE;
                
                if ($this->is_FE()) {
@@ -1819,7 +1498,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                }
        }
 
-       function cleanList($str)        {
+       public function cleanList($str)        {
                if (strstr($str,'*'))   {
                        $str = '*';
                } else {
index a01eece..73534db 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/doc/manual.sxw and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
index 984a838..004e15e 100644 (file)
@@ -66,6 +66,10 @@ $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Acronym'] = array();
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Acronym']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/Acronym/class.tx_rtehtmlarea_acronym.php:&tx_rtehtmlarea_acronym';
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Acronym']['addIconsToSkin'] = 0;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Acronym']['disableInFE'] = 1;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UserElements'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UserElements']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/UserElements/class.tx_rtehtmlarea_userelements.php:&tx_rtehtmlarea_userelements';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UserElements']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UserElements']['disableInFE'] = 1;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['InlineElements'] = array();
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['InlineElements']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/InlineElements/class.tx_rtehtmlarea_inlineelements.php:&tx_rtehtmlarea_inlineelements';
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TextStyle'] = array();
@@ -84,10 +88,26 @@ $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link'] = array();
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php:&tx_rtehtmlarea_typo3link';
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['addIconsToSkin'] = 0;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['disableInFE'] = 1;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultColor'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultColor']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultColor/class.tx_rtehtmlarea_defaultcolor.php:&tx_rtehtmlarea_defaultcolor';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultColor']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultColor']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Color'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Color']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php:&tx_rtehtmlarea_typo3color';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Color']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Color']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultFont'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultFont']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php:&tx_rtehtmlarea_defaultfont';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultFont']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultFont']['disableInFE'] = 0;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['InsertSmiley'] = array();
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['InsertSmiley']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/InsertSmiley/class.tx_rtehtmlarea_insertsmiley.php:&tx_rtehtmlarea_insertsmiley';
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['InsertSmiley']['addIconsToSkin'] = 0;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['InsertSmiley']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Language'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Language']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/Language/class.tx_rtehtmlarea_language.php:&tx_rtehtmlarea_language';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Language']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['Language']['disableInFE'] = 0;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['SpellChecker'] = array();
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['SpellChecker']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/SpellChecker/class.tx_rtehtmlarea_spellchecker.php:&tx_rtehtmlarea_spellchecker';
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['SpellChecker']['addIconsToSkin'] = 0;
@@ -100,6 +120,19 @@ $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['RemoveFormat'] = array();
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['RemoveFormat']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/RemoveFormat/class.tx_rtehtmlarea_removeformat.php:&tx_rtehtmlarea_removeformat';
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['RemoveFormat']['addIconsToSkin'] = 0;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['RemoveFormat']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultClean'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultClean']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php:&tx_rtehtmlarea_defaultclean';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultClean'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3HtmlParser']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php:&tx_rtehtmlarea_typo3htmlparser';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3HtmlParser']['disableInFE'] = 1;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['QuickTag'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['QuickTag']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/QuickTag/class.tx_rtehtmlarea_quicktag.php:&tx_rtehtmlarea_quicktag';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['QuickTag']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['QuickTag']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TableOperations'] = array();
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TableOperations']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php:&tx_rtehtmlarea_tableoperations';
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TableOperations']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TableOperations']['disableInFE'] = 0;
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['AboutEditor'] = array();
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['AboutEditor']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/AboutEditor/class.tx_rtehtmlarea_abouteditor.php:&tx_rtehtmlarea_abouteditor';
 $TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['AboutEditor']['addIconsToSkin'] = 0;
index d44edff..bf879f3 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2007 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2007-2208 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
 *  All rights reserved
 *
 *  This script is part of the Typo3 project. The Typo3 project is
@@ -43,7 +43,7 @@ class tx_rtehtmlarea_blockelements extends tx_rtehtmlareaapi {
        protected $toolbar;                                     // Reference to RTE toolbar array
        protected $LOCAL_LANG;                                  // Frontend language array
        
-       protected $pluginButtons = 'formatblock, indent, outdent, blockquote, insertparagraphbefore, insertparagraphafter, left, center, right, justifyfull';
+       protected $pluginButtons = 'formatblock, indent, outdent, blockquote, insertparagraphbefore, insertparagraphafter, left, center, right, justifyfull, orderedlist, unorderedlist';
        protected $convertToolbarForHtmlAreaArray = array (
                'formatblock'           => 'FormatBlock',
                'indent'                => 'Indent',
@@ -55,6 +55,8 @@ class tx_rtehtmlarea_blockelements extends tx_rtehtmlareaapi {
                'center'                => 'JustifyCenter',
                'right'                 => 'JustifyRight',
                'justifyfull'           => 'JustifyFull',
+               'orderedlist'           => 'InsertOrderedList',
+               'unorderedlist'         => 'InsertUnorderedList',
                );
        
        private $defaultBlockElements = array(
index 288ecfc..159f326 100644 (file)
@@ -1,5 +1,5 @@
 /* Selectors for the BlockElements extension of htmlArea RTE */
-/* TYPO3 SVN ID: $Id$ */
+/* TYPO3 SVN ID: $Id htmlarea.css $ */
 .htmlarea .toolbar .Indent {background-image:url("images/indent.gif");}
 .htmlarea .toolbar .Outdent {background-image:url("images/outdent.gif");}
 .htmlarea .toolbar .Blockquote {background-image:url("images/blockquote.gif");}
@@ -9,3 +9,5 @@
 .htmlarea .toolbar .JustifyCenter, .htmlarea-context-menu .JustifyCenter {background-image:url("images/justifyCenter.gif");}
 .htmlarea .toolbar .JustifyRight, .htmlarea-context-menu .JustifyRight {background-image:url("images/justifyRight.gif");}
 .htmlarea .toolbar .JustifyFull, .htmlarea-context-menu .JustifyFull {background-image:url("images/justifyFull.gif");}
+.htmlarea .toolbar .InsertOrderedList, .htmlarea-context-menu .InsertOrderedList {background-image:url("images/insertOrderedList.gif");}
+.htmlarea .toolbar .InsertUnorderedList, .htmlarea-context-menu .InsertUnorderedList {background-image:url("images/insertUnorderedList.gif");}
diff --git a/typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertOrderedList.gif b/typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertOrderedList.gif
new file mode 100644 (file)
index 0000000..c45cb7d
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertOrderedList.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertUnorderedList.gif b/typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertUnorderedList.gif
new file mode 100644 (file)
index 0000000..26979d3
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/BlockElements/skin/images/insertUnorderedList.gif differ
index 0a78aa5..d0c19be 100644 (file)
@@ -37,7 +37,7 @@ class tx_rtehtmlarea_charactermap extends tx_rtehtmlareaapi {
        protected $extensionKey = 'rtehtmlarea';        // The key of the extension that is extending htmlArea RTE
        protected $pluginName = 'CharacterMap';         // The name of the plugin registered by the extension
        protected $relativePathToLocallangFile = '';    // Path to this main locallang file of the extension relative to the extension dir.
-       protected $relativePathToSkin = '';             // Path to the skin (css) file relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/CharacterMap/skin/htmlarea.css';    // Path to the skin (css) file relative to the extension dir.
        protected $htmlAreaRTE;                         // Reference to the invoking object
        protected $thisConfig;                          // Reference to RTE PageTSConfig
        protected $toolbar;                             // Reference to RTE toolbar array
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php b/typo3/sysext/rtehtmlarea/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php
new file mode 100644 (file)
index 0000000..71a9584
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Default Clean extension for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: class.tx_rtehtmlarea_acronym.php 2926 2008-01-20 08:58:13Z ingmars $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_defaultclean extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';                // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'DefaultClean';                 // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = '';            // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = '';                     // Path to the skin (css) file relative to the extension dir
+       protected $htmlAreaRTE;                                 // Reference to the invoking object
+       protected $thisConfig;                                  // Reference to RTE PageTSConfig
+       protected $toolbar;                                     // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                                  // Frontend language array
+       
+       protected $pluginButtons = 'cleanword';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'cleanword'     => 'CleanWord',
+               );
+       
+       public function main($parentObject) {
+               return parent::main($parentObject) && $this->thisConfig['enableWordClean'];
+       }
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return      string          JS configuration for registered plugins, in this case, JS configuration of block elements
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               
+               $registerRTEinJavascriptString = '';
+               $button = 'cleanword';
+               if (in_array($button, $this->toolbar)) {
+                       if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$button.'.'])) {
+                                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .' = new Object();';
+                       }
+                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .' = {"hotKey" : "0"};';
+               }
+               return $registerRTEinJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultColor/class.tx_rtehtmlarea_defaultcolor.php b/typo3/sysext/rtehtmlarea/extensions/DefaultColor/class.tx_rtehtmlarea_defaultcolor.php
new file mode 100644 (file)
index 0000000..12d1d84
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * DefaulColor plugin for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_defaultcolor extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';        // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'DefaultColor'; // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = 'extensions/DefaultColor/locallang.xml';       // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/DefaultColor/skin/htmlarea.css';            // Path to the skin (css) file relative to the extension dir.
+       protected $htmlAreaRTE;                         // Reference to the invoking object
+       protected $thisConfig;                          // Reference to RTE PageTSConfig
+       protected $toolbar;                             // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                          // Frontend language array
+       
+       protected $pluginButtons = 'textcolor,bgcolor';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'textcolor'             => 'ForeColor',
+               'bgcolor'               => 'HiliteColor',
+               );
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return string               JS configuration for registered plugins
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               global $TSFE, $LANG;
+               
+               $registerRTEinJavascriptString = '';
+               return $registerRTEinJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultColor/class.tx_rtehtmlarea_defaultcolor.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultColor/class.tx_rtehtmlarea_defaultcolor.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultColor/locallang.xml b/typo3/sysext/rtehtmlarea/extensions/DefaultColor/locallang.xml
new file mode 100644 (file)
index 0000000..f4abc28
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- TYPO3 SVN ID: $Id$ -->
+<T3locallang>
+       <meta type="array">
+               <description>Labels for Default Color plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/htmlarea.css b/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/htmlarea.css
new file mode 100644 (file)
index 0000000..f7e8f25
--- /dev/null
@@ -0,0 +1,4 @@
+/* Selectors for the DefaultColor plugin of htmlArea RTE */
+/* TYPO3 SVN ID: $Id: $ */
+.htmlarea .toolbar .ForeColor {background-image:url("images/forecolor.gif");}
+.htmlarea .toolbar .HiliteColor {background-image:url("images/hilitecolor.gif");}
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/forecolor.gif b/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/forecolor.gif
new file mode 100644 (file)
index 0000000..b563549
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/forecolor.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/hilitecolor.gif b/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/hilitecolor.gif
new file mode 100644 (file)
index 0000000..f47f992
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/DefaultColor/skin/images/hilitecolor.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php b/typo3/sysext/rtehtmlarea/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php
new file mode 100644 (file)
index 0000000..a609005
--- /dev/null
@@ -0,0 +1,256 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Default Font plugin for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_defaultfont extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';        // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'DefaultFont';  // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = 'extensions/DefaultFont/locallang.xml';        // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = '';             // Path to the skin (css) file relative to the extension dir.
+       protected $htmlAreaRTE;                         // Reference to the invoking object
+       protected $thisConfig;                          // Reference to RTE PageTSConfig
+       protected $toolbar;                             // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                          // Frontend language array
+       
+       protected $pluginButtons = 'fontstyle,fontsize';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'fontstyle'             => 'FontName',
+               'fontsize'              => 'FontSize',
+               );
+       
+       private $defaultFontFaces = array(
+               'Arial'                 => 'Arial,sans-serif',
+               'Arial Black'           => 'Arial Black,sans-serif',
+               'Verdana'               => 'Verdana,Arial,sans-serif',
+               'Times New Roman'       => 'Times New Roman,Times,serif',
+               'Garamond'              => 'Garamond',
+               'Lucida Handwriting'    => 'Lucida Handwriting',
+               'Courier'               => 'Courier',
+               'Webdings'              => 'Webdings',
+               'Wingdings'             => 'Wingdings',
+               );
+                               
+       private $defaultFontSizes = array(
+               '1'     =>      '1 (8 pt)',
+               '2'     =>      '2 (10 pt)',
+               '3'     =>      '3 (12 pt)',
+               '4'     =>      '4 (14 pt)',
+               '5'     =>      '5 (18 pt)',
+               '6'     =>      '6 (24 pt)',
+               '7'     =>      '7 (36 pt)',
+               );
+       
+       private $defaultFontSizes_safari = array(
+               '1'     =>      'x-small (10px)',
+               '2'     =>      'small (13px)',
+               '3'     =>      'medium (16px)',
+               '4'     =>      'large (18px)',
+               '5'     =>      'x-large (24px)',
+               '6'     =>      'xx-large (32px)',
+               '7'     =>      'xxx-large (48px)',
+               );
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return string               JS configuration for registered plugins
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               
+               $registerRTEinJavascriptString = '';
+               
+                       // Process font faces configuration
+               if (in_array('fontstyle',$this->toolbar)) {
+                       $registerRTEinJavascriptString .= $this->buildJSFontFacesConfig($RTEcounter);
+               }
+               
+                       // Process font sizes configuration
+               if (in_array('fontsize',$this->toolbar)) {
+                       $registerRTEinJavascriptString .= $this->buildJSFontSizesConfig($RTEcounter);
+               }
+               
+               return $registerRTEinJavascriptString;
+       }
+       
+       /**
+        * Return Javascript configuration of font faces
+        *
+        * @param       integer         $RTEcounter: The index number of the current RTE editing area within the form.
+        *
+        * @return      string          Javascript configuration of font faces
+        */
+       private function buildJSFontfacesConfig($RTEcounter) {
+               global $TSFE, $LANG;
+               
+               if ($this->htmlAreaRTE->is_FE()) {
+                       $RTEProperties = $this->htmlAreaRTE->RTEsetup;
+               } else {
+                       $RTEProperties = $this->htmlAreaRTE->RTEsetup['properties'];
+               }
+               
+               $configureRTEInJavascriptString = '';
+               
+                       // Builing JS array of default font faces
+               $HTMLAreaFontname = array();
+               $HTMLAreaFontname['nofont'] = '
+                               "' . $fontName . '" : "' . $this->htmlAreaRTE->cleanList($fontValue) . '"';
+               $defaultFontFacesList = 'nofont,';
+               if ($this->htmlAreaRTE->is_FE()) {
+                       $HTMLAreaFontname['nofont'] = '
+                               "' . $TSFE->csConvObj->conv($TSFE->getLLL('No font',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset) . '" : ""';
+               } else {
+                       $HTMLAreaFontname['nofont'] = '
+                               "' . $LANG->getLL('No font') . '" : ""';
+               }
+               
+               $hideFontFaces = $this->htmlAreaRTE->cleanList($this->thisConfig['hideFontFaces']);
+               if ($hideFontFaces != '*') {
+                       $index = 0;
+                       foreach ($this->defaultFontFaces as $fontName => $fontValue) {
+                               if (!t3lib_div::inList($hideFontFaces, $index+1)) {
+                                       $HTMLAreaFontname[$fontName] = '
+                               "' . $fontName . '" : "' . $this->htmlAreaRTE->cleanList($fontValue) . '"';
+                                       $defaultFontFacesList .= $fontName . ',';
+                               }
+                               $index++;
+                       }
+               }
+               
+                       // Adding configured font faces
+               if (is_array($RTEProperties['fonts.'])) {
+                       foreach ($RTEProperties['fonts.'] as $fontName => $conf) {
+                               $fontName = substr($fontName,0,-1);
+                               $fontLabel = $this->htmlAreaRTE->getPageConfigLabel($conf['name'],0);
+                               $HTMLAreaFontname[$fontName] = '
+                               "' . $fontLabel . '" : "' . $this->htmlAreaRTE->cleanList($conf['value']) . '"';
+                       }
+               }
+               
+                       // Setting the list of font faces
+               $HTMLAreaJSFontface = '{';
+               $HTMLAreaFontface = t3lib_div::trimExplode(',' , $this->htmlAreaRTE->cleanList($defaultFontFacesList . ',' . $this->thisConfig['fontFace']));
+               $HTMLAreaFontfaceIndex = 0;
+               foreach ($HTMLAreaFontface as $fontName) {
+                       if ($HTMLAreaFontfaceIndex) { 
+                               $HTMLAreaJSFontface .= ',';
+                       }
+                       $HTMLAreaJSFontface .= $HTMLAreaFontname[$fontName];
+                       $HTMLAreaFontfaceIndex++;
+               }
+               $HTMLAreaJSFontface .= '};';
+               
+               $button = 'fontstyle';
+               if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$button.'.'])) {
+                       $configureRTEInJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .' = new Object();';
+               }
+               $configureRTEInJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .'.options = '. $HTMLAreaJSFontface;
+               
+               return $configureRTEInJavascriptString;
+       }
+       
+       /**
+        * Return Javascript configuration of font sizes
+        *
+        * @param       integer         $RTEcounter: The index number of the current RTE editing area within the form.
+        *
+        * @return      string          Javascript font sizes configuration
+        */
+       private function buildJSFontSizesConfig($RTEcounter) {
+               global $LANG, $TSFE;
+               $configureRTEInJavascriptString = '';
+               
+                       // Builing JS array of default font sizes
+               $HTMLAreaFontSizes = array();
+               if ($this->htmlAreaRTE->is_FE()) {
+                       $HTMLAreaFontSizes[0] = $TSFE->csConvObj->conv($TSFE->getLLL('No size',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset);
+               } else {
+                       $HTMLAreaFontSizes[0] = $LANG->getLL('No size');
+               }
+               
+               foreach ($this->defaultFontSizes as $FontSizeItem => $FontSizeLabel) {
+                       if ($this->htmlAreaRTE->client['BROWSER'] == 'safari') {
+                               $HTMLAreaFontSizes[$FontSizeItem] = $this->defaultFontSizes_safari[$FontSizeItem];
+                       } else {
+                               $HTMLAreaFontSizes[$FontSizeItem] = $FontSizeLabel;
+                       }
+               }
+               if ($this->thisConfig['hideFontSizes'] ) {
+                       $hideFontSizes =  t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList($this->thisConfig['hideFontSizes']), 1);
+                       foreach ($hideFontSizes as $item)  {
+                               if ($HTMLAreaFontSizes[strtolower($item)]) {
+                                       unset($HTMLAreaFontSizes[strtolower($item)]);
+                               }
+                       }
+               }
+               
+               $HTMLAreaJSFontSize = '{';
+               if ($this->htmlAreaRTE->cleanList($this->thisConfig['hideFontSizes']) != '*') {
+                       $HTMLAreaFontSizeIndex = 0;
+                       foreach ($HTMLAreaFontSizes as $FontSizeItem => $FontSizeLabel) {
+                               if($HTMLAreaFontSizeIndex) { 
+                                       $HTMLAreaJSFontSize .= ',';
+                               }
+                               $HTMLAreaJSFontSize .= '
+                               "' . $FontSizeLabel . '" : "' . ($FontSizeItem?$FontSizeItem:'') . '"';
+                               $HTMLAreaFontSizeIndex++;
+                       }
+               }
+               $HTMLAreaJSFontSize .= '};';
+               
+               $button = 'fontsize';
+               if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$button.'.'])) {
+                       $configureRTEInJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .' = new Object();';
+               }
+               $configureRTEInJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .'.options = '. $HTMLAreaJSFontSize;
+               
+               return $configureRTEInJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/DefaultFont/locallang.xml b/typo3/sysext/rtehtmlarea/extensions/DefaultFont/locallang.xml
new file mode 100644 (file)
index 0000000..bb1db3d
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- TYPO3 SVN ID: $Id$ -->
+<T3locallang>
+       <meta type="array">
+               <description>Labels for Default Font plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="No font">No font</label>
+                       <label index="No size">No font size</label>
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php b/typo3/sysext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php
new file mode 100644 (file)
index 0000000..9881e24
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Language plugin for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: class.tx_rtehtmlarea_language.php 2862 2008-01-05 19:32:58Z stanrolland $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_language extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';        // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'Language';             // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = '';    // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/Language/skin/htmlarea.css';                // Path to the skin (css) file relative to the extension dir.
+       protected $htmlAreaRTE;                         // Reference to the invoking object
+       protected $thisConfig;                          // Reference to RTE PageTSConfig
+       protected $toolbar;                             // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                          // Frontend language array
+       
+       protected $pluginButtons = 'lefttoright,righttoleft';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'lefttoright'           => 'LeftToRight',
+               'righttoleft'           => 'RightToLeft',
+               );
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return string               JS configuration for registered plugins
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.'].buttons.button-id.property = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               global $TSFE, $LANG;
+               
+               $registerRTEinJavascriptString = '';
+               return $registerRTEinJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/Language/skin/htmlarea.css b/typo3/sysext/rtehtmlarea/extensions/Language/skin/htmlarea.css
new file mode 100644 (file)
index 0000000..be72357
--- /dev/null
@@ -0,0 +1,4 @@
+/* Selectors for the Language plugin of htmlArea RTE */
+/* TYPO3 SVN ID: $Id: htmlarea.css 2862 2008-01-05 19:32:58Z stanrolland $ */
+.htmlarea .toolbar .LeftToRight {background-image:url("images/left_to_right.gif");}
+.htmlarea .toolbar .RightToLeft {background-image:url("images/right_to_left.gif");}
diff --git a/typo3/sysext/rtehtmlarea/extensions/Language/skin/images/left_to_right.gif b/typo3/sysext/rtehtmlarea/extensions/Language/skin/images/left_to_right.gif
new file mode 100644 (file)
index 0000000..c0871fc
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/Language/skin/images/left_to_right.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/Language/skin/images/right_to_left.gif b/typo3/sysext/rtehtmlarea/extensions/Language/skin/images/right_to_left.gif
new file mode 100644 (file)
index 0000000..4e867a4
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/Language/skin/images/right_to_left.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/QuickTag/class.tx_rtehtmlarea_quicktag.php b/typo3/sysext/rtehtmlarea/extensions/QuickTag/class.tx_rtehtmlarea_quicktag.php
new file mode 100644 (file)
index 0000000..b7f3dbe
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * CharacterMap plugin for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: class.tx_rtehtmlarea_quicktag.php $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_quicktag extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';        // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'QuickTag';             // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = '';    // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/QuickTag/skin/htmlarea.css';                // Path to the skin (css) file relative to the extension dir.
+       protected $htmlAreaRTE;                         // Reference to the invoking object
+       protected $thisConfig;                          // Reference to RTE PageTSConfig
+       protected $toolbar;                             // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                          // Frontend language array
+       
+       protected $pluginButtons = 'inserttag';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'inserttag'     => 'InsertTag',
+               );
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return string               JS configuration for registered plugins
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               
+               $registerRTEinJavascriptString = '';
+                       // Deprecated inserttag button configuration
+               if (in_array('inserttag', $this->toolbar) && trim($this->thisConfig['hideTags'])) {
+                       if (!is_array($this->thisConfig['buttons.']['inserttag.'])) {
+                               $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.inserttag = new Object();
+                       RTEarea['.$RTEcounter.'].buttons.inserttag.denyTags = "'.implode(',', t3lib_div::trimExplode(',', $this->thisConfig['hideTags'], 1)).'";';
+                       } elseif (!$this->thisConfig['buttons.']['inserttag.']['denyTags']) {
+                               $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.inserttag.denyTags = "'.implode(',', t3lib_div::trimExplode(',', $this->thisConfig['hideTags'], 1)).'";';
+                       }
+               }
+               return $registerRTEinJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/QuickTag/class.tx_rtehtmlarea_quicktag.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/QuickTag/class.tx_rtehtmlarea_quicktag.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/QuickTag/skin/htmlarea.css b/typo3/sysext/rtehtmlarea/extensions/QuickTag/skin/htmlarea.css
new file mode 100644 (file)
index 0000000..9904438
--- /dev/null
@@ -0,0 +1,3 @@
+/* Selectors for the QuickTag plugin of htmlArea RTE */
+/* TYPO3 SVN ID: $Id: htmlarea.css $ */
+.htmlarea .toolbar .InsertTag {background-image:url("images/inserttag.gif");}
diff --git a/typo3/sysext/rtehtmlarea/extensions/QuickTag/skin/images/inserttag.gif b/typo3/sysext/rtehtmlarea/extensions/QuickTag/skin/images/inserttag.gif
new file mode 100644 (file)
index 0000000..9158851
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/QuickTag/skin/images/inserttag.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php b/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php
new file mode 100644 (file)
index 0000000..ea69782
--- /dev/null
@@ -0,0 +1,132 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * TYPO3 Color plugin for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_typo3color extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';        // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'TYPO3Color';   // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = 'extensions/TYPO3Color/locallang.xml'; // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/TYPO3Color/skin/htmlarea.css';              // Path to the skin (css) file relative to the extension dir.
+       protected $htmlAreaRTE;                         // Reference to the invoking object
+       protected $thisConfig;                          // Reference to RTE PageTSConfig
+       protected $toolbar;                             // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                          // Frontend language array
+       
+       protected $pluginButtons = 'textcolor,bgcolor';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'textcolor'             => 'ForeColor',
+               'bgcolor'               => 'HiliteColor',
+               );
+       
+       public function main($parentObject) {
+               return parent::main($parentObject) && !$this->thisConfig['disableSelectColor'];
+       }
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return string               JS configuration for registered plugins
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               
+                       // Process colors configuration
+               $registerRTEinJavascriptString = $this->buildJSColorsConfig($RTEcounter);
+               
+               return $registerRTEinJavascriptString;
+       }
+       
+       /**
+        * Return Javascript configuration of colors
+        *
+        * @param       integer         $RTEcounter: The index number of the current RTE editing area within the form.
+        *
+        * @return      string          Javascript configuration of colors
+        */
+       function buildJSColorsConfig($RTEcounter) {
+               
+               if ($this->htmlAreaRTE->is_FE()) {
+                       $RTEProperties = $this->htmlAreaRTE->RTEsetup;
+               } else {
+                       $RTEProperties = $this->htmlAreaRTE->RTEsetup['properties'];
+               }
+               
+               $configureRTEInJavascriptString = '';
+               
+               $configureRTEInJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].disableColorPicker = ' . (trim($this->thisConfig['disableColorPicker']) ? 'true' : 'false') . ';';
+               
+                       // Building JS array of configured colors
+               if (is_array($RTEProperties['colors.']) )  {
+                       $HTMLAreaColorname = array();
+                       foreach ($RTEProperties['colors.'] as $colorName => $conf) {
+                               $colorName=substr($colorName,0,-1);
+                               $colorLabel = $this->htmlAreaRTE->getPageConfigLabel($conf['name']);
+                               $HTMLAreaColorname[$colorName] = '
+                               [' . $colorLabel . ' , "' . $conf['value'] . '"]';
+                       }
+               }
+               
+                       // Setting the list of colors if specified in the RTE config
+               if ($this->thisConfig['colors'] ) {
+                       $HTMLAreaJSColors = '[';
+                       $HTMLAreaColors = t3lib_div::trimExplode(',' , $this->htmlAreaRTE->cleanList($this->thisConfig['colors']));
+                       $HTMLAreaColorsIndex = 0;
+                       foreach ($HTMLAreaColors as $colorName) {
+                               if($HTMLAreaColorsIndex && $HTMLAreaColorname[$colorName]) { 
+                                       $HTMLAreaJSColors .= ',';
+                               }
+                               $HTMLAreaJSColors .= $HTMLAreaColorname[$colorName];
+                               $HTMLAreaColorsIndex++;
+                       }
+                       $HTMLAreaJSColors .= '];';
+                       $configureRTEInJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].colors = '. $HTMLAreaJSColors;
+               }
+               
+               return $configureRTEInJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/locallang.xml b/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/locallang.xml
new file mode 100644 (file)
index 0000000..3e56866
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- TYPO3 SVN ID: $Id$ -->
+<T3locallang>
+       <meta type="array">
+               <description>Labels for TYPO3 Color plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/htmlarea.css b/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/htmlarea.css
new file mode 100644 (file)
index 0000000..75e270b
--- /dev/null
@@ -0,0 +1,4 @@
+/* Selectors for the TYPO3Color plugin of htmlArea RTE */
+/* TYPO3 SVN ID: $Id: $ */
+.htmlarea .toolbar .ForeColor {background-image:url("images/forecolor.gif");}
+.htmlarea .toolbar .HiliteColor {background-image:url("images/hilitecolor.gif");}
diff --git a/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/forecolor.gif b/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/forecolor.gif
new file mode 100644 (file)
index 0000000..b563549
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/forecolor.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/hilitecolor.gif b/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/hilitecolor.gif
new file mode 100644 (file)
index 0000000..f47f992
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TYPO3Color/skin/images/hilitecolor.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php b/typo3/sysext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php
new file mode 100644 (file)
index 0000000..8e9916f
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * TYPO3 HTML Parser extension for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: class.tx_rtehtmlarea_typo3htmlparser.php 2926 2008-01-20 08:58:13Z ingmars $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_typo3htmlparser extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';                // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'TYPO3HtmlParser';                      // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = '';            // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = '';             // Path to the skin (css) file relative to the extension dir
+       protected $htmlAreaRTE;                                 // Reference to the invoking object
+       protected $thisConfig;                                  // Reference to RTE PageTSConfig
+       protected $toolbar;                                     // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                                  // Frontend language array
+       
+       protected $pluginButtons = 'cleanword';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'cleanword'     => 'CleanWord',
+               );
+       
+       public function main($parentObject) {
+               return parent::main($parentObject) && $this->thisConfig['enableWordClean'] && is_array($this->thisConfig['enableWordClean.']);
+       }
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return      string          JS configuration for registered plugins, in this case, JS configuration of block elements
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               
+               $registerRTEinJavascriptString = '';
+               $button = 'cleanword';
+               if (in_array($button, $this->toolbar)) {
+                       if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$button.'.'])) {
+                                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .' = new Object();';
+                       }
+                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .'.pathParseHtmlModule = "' . $this->htmlAreaRTE->extHttpPath . 'mod6/parse_html.php";
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .'.hotKey = 0;';
+               }
+               return $registerRTEinJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php b/typo3/sysext/rtehtmlarea/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php
new file mode 100644 (file)
index 0000000..eb5784c
--- /dev/null
@@ -0,0 +1,128 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Table Operations extension for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: class.tx_rtehtmlarea_tableoperations.php 2926 2008-01-20 08:58:13Z ingmars $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_tableoperations extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';                // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'TableOperations';              // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = '';    // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/TableOperations/skin/htmlarea.css';         // Path to the skin (css) file relative to the extension dir
+       protected $htmlAreaRTE;                                 // Reference to the invoking object
+       protected $thisConfig;                                  // Reference to RTE PageTSConfig
+       protected $toolbar;                                     // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                                  // Frontend language array
+       
+       protected $pluginButtons = 'table, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit,
+                                               columninsertbefore, columninsertafter, columndelete, columnsplit,
+                                               cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'table'                 => 'InsertTable',
+               'toggleborders'         => 'TO-toggle-borders',
+               'tableproperties'       => 'TO-table-prop',
+               'rowproperties'         => 'TO-row-prop',
+               'rowinsertabove'        => 'TO-row-insert-above',
+               'rowinsertunder'        => 'TO-row-insert-under',
+               'rowdelete'             => 'TO-row-delete',
+               'rowsplit'              => 'TO-row-split',
+               'columninsertbefore'    => 'TO-col-insert-before',
+               'columninsertafter'     => 'TO-col-insert-after',
+               'columndelete'          => 'TO-col-delete',
+               'columnsplit'           => 'TO-col-split',
+               'cellproperties'        => 'TO-cell-prop',
+               'cellinsertbefore'      => 'TO-cell-insert-before',
+               'cellinsertafter'       => 'TO-cell-insert-after',
+               'celldelete'            => 'TO-cell-delete',
+               'cellsplit'             => 'TO-cell-split',
+               'cellmerge'             => 'TO-cell-merge',
+               );
+       
+       public function main($parentObject) {
+               global $TYPO3_CONF_VARS;
+               
+               $available = parent::main($parentObject);
+               
+               if ($this->htmlAreaRTE->client['BROWSER'] == 'opera') {
+                       $this->thisConfig['hideTableOperationsInToolbar'] = 0;
+               }
+               
+               return $available;
+       }
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return      string          JS configuration for registered plugins, in this case, JS configuration of block elements
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               global $TSFE, $LANG;
+               
+               $registerRTEinJavascriptString = '';
+               if (in_array('table', $this->toolbar)) {
+                       
+                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].hideTableOperationsInToolbar = ' . (trim($this->thisConfig['hideTableOperationsInToolbar']) ? 'true' : 'false') . ';
+                       RTEarea['.$RTEcounter.'].disableLayoutFieldsetInTableOperations = ' . (trim($this->thisConfig['disableLayoutFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$RTEcounter.'].disableAlignmentFieldsetInTableOperations = ' . (trim($this->thisConfig['disableAlignmentFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$RTEcounter.'].disableSpacingFieldsetInTableOperations = ' . (trim($this->thisConfig['disableSpacingFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$RTEcounter.'].disableBordersFieldsetInTableOperations = ' . (trim($this->thisConfig['disableBordersFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$RTEcounter.'].disableColorFieldsetInTableOperations = ' . (trim($this->thisConfig['disableColorFieldsetInTableOperations'])?'true':'false') . ';';
+                       
+                               // Deprecated toggleborders button configuration
+                       if (in_array('toggleborders',$this->toolbar) && $this->thisConfig['keepToggleBordersInToolbar']) {
+                               if (!is_array($this->thisConfig['buttons.']['toggleborders.'])) {
+                                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.toggleborders = new Object();
+                       RTEarea['.$RTEcounter.'].buttons.toggleborders.keepInToolbar = true;';
+                               } elseif (!$this->thisConfig['buttons.']['toggleborders.']['keepInToolbar']) {
+                                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.toggleborders.keepInToolbar = true;';
+                               }
+                       }
+               }
+               return $registerRTEinJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/htmlarea.css b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/htmlarea.css
new file mode 100644 (file)
index 0000000..c1f21a9
--- /dev/null
@@ -0,0 +1,20 @@
+/* Selectors for the Table Operations extension of htmlArea RTE */
+/* TYPO3 SVN ID: $Id $ */
+.htmlarea .toolbar .InsertTable {background-image:url("images/insert_table.gif");}
+.htmlarea .toolbar .TO-toggle-borders, .htmlarea-context-menu .TO-toggle-borders {background-image:url("images/TableOperations/toggle-borders.gif");}
+.htmlarea .toolbar .TO-table-prop, .htmlarea-context-menu .TO-table-prop  {background-image:url("images/TableOperations/table-prop.gif");}
+.htmlarea .toolbar .TO-row-prop, .htmlarea-context-menu .TO-row-prop {background-image:url("images/TableOperations/row-prop.gif");}
+.htmlarea .toolbar .TO-row-insert-above, .htmlarea-context-menu .TO-row-insert-above {background-image:url("images/TableOperations/row-insert-above.gif");}
+.htmlarea .toolbar .TO-row-insert-under, .htmlarea-context-menu .TO-row-insert-under {background-image:url("images/TableOperations/row-insert-under.gif");}
+.htmlarea .toolbar .TO-row-delete, .htmlarea-context-menu .TO-row-delete {background-image:url("images/TableOperations/row-delete.gif");}
+.htmlarea .toolbar .TO-row-split, .htmlarea-context-menu .TO-row-split {background-image:url("images/TableOperations/row-split.gif");}
+.htmlarea .toolbar .TO-col-insert-before, .htmlarea-context-menu .TO-col-insert-before {background-image:url("images/TableOperations/col-insert-before.gif");}
+.htmlarea .toolbar .TO-col-insert-after, .htmlarea-context-menu .TO-col-insert-after {background-image:url("images/TableOperations/col-insert-after.gif");}
+.htmlarea .toolbar .TO-col-delete, .htmlarea-context-menu .TO-col-delete {background-image:url("images/TableOperations/col-delete.gif");}
+.htmlarea .toolbar .TO-col-split, .htmlarea-context-menu .TO-col-split {background-image:url("images/TableOperations/col-split.gif");}
+.htmlarea .toolbar .TO-cell-prop, .htmlarea-context-menu .TO-cell-prop {background-image:url("images/TableOperations/cell-prop.gif");}
+.htmlarea .toolbar .TO-cell-insert-before, .htmlarea-context-menu .TO-cell-insert-before {background-image:url("images/TableOperations/cell-insert-before.gif");}
+.htmlarea .toolbar .TO-cell-insert-after, .htmlarea-context-menu .TO-cell-insert-after {background-image:url("images/TableOperations/cell-insert-after.gif");}
+.htmlarea .toolbar .TO-cell-delete, .htmlarea-context-menu .TO-cell-delete {background-image:url("images/TableOperations/cell-delete.gif");}
+.htmlarea .toolbar .TO-cell-split, .htmlarea-context-menu .TO-cell-split {background-image:url("images/TableOperations/cell-split.gif");}
+.htmlarea .toolbar .TO-cell-merge, .htmlarea-context-menu .TO-cell-merge {background-image:url("images/TableOperations/cell-merge.gif");}
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-delete.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-delete.gif
new file mode 100644 (file)
index 0000000..0e13aa8
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-delete.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-after.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-after.gif
new file mode 100644 (file)
index 0000000..8265746
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-after.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-before.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-before.gif
new file mode 100644 (file)
index 0000000..5607503
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-insert-before.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-merge.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-merge.gif
new file mode 100644 (file)
index 0000000..4bb9bc3
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-merge.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-prop.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-prop.gif
new file mode 100644 (file)
index 0000000..d8bd26e
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-prop.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-split.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-split.gif
new file mode 100644 (file)
index 0000000..50100d6
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/cell-split.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-delete.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-delete.gif
new file mode 100644 (file)
index 0000000..d6e4dba
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-delete.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-after.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-after.gif
new file mode 100644 (file)
index 0000000..0d34078
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-after.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-before.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-before.gif
new file mode 100644 (file)
index 0000000..53e9a11
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-insert-before.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-split.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-split.gif
new file mode 100644 (file)
index 0000000..3e4d59b
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/col-split.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/insert_table.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/insert_table.gif
new file mode 100644 (file)
index 0000000..cd95587
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/insert_table.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-delete.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-delete.gif
new file mode 100644 (file)
index 0000000..aca68dc
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-delete.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-above.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-above.gif
new file mode 100644 (file)
index 0000000..a3d9ca5
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-above.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-under.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-under.gif
new file mode 100644 (file)
index 0000000..abe8e4a
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-insert-under.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-prop.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-prop.gif
new file mode 100644 (file)
index 0000000..5f3dc93
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-prop.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-split.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-split.gif
new file mode 100644 (file)
index 0000000..926c6a7
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/row-split.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/table-prop.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/table-prop.gif
new file mode 100644 (file)
index 0000000..01c924c
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/table-prop.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/toggle-borders.gif b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/toggle-borders.gif
new file mode 100644 (file)
index 0000000..f6ee52e
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/TableOperations/skin/images/toggle-borders.gif differ
diff --git a/typo3/sysext/rtehtmlarea/extensions/UserElements/class.tx_rtehtmlarea_userelements.php b/typo3/sysext/rtehtmlarea/extensions/UserElements/class.tx_rtehtmlarea_userelements.php
new file mode 100644 (file)
index 0000000..5bc9ebc
--- /dev/null
@@ -0,0 +1,84 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the Typo3 project. The Typo3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * User Elements extension for htmlArea RTE
+ *
+ * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * TYPO3 SVN ID: $Id: class.tx_rtehtmlarea_userelements.php $
+ *
+ */
+
+require_once(t3lib_extMgm::extPath('rtehtmlarea').'class.tx_rtehtmlareaapi.php');
+
+class tx_rtehtmlarea_userelements extends tx_rtehtmlareaapi {
+
+       protected $extensionKey = 'rtehtmlarea';                // The key of the extension that is extending htmlArea RTE
+       protected $pluginName = 'UserElements';                 // The name of the plugin registered by the extension
+       protected $relativePathToLocallangFile = '';            // Path to this main locallang file of the extension relative to the extension dir.
+       protected $relativePathToSkin = 'extensions/UserElements/skin/htmlarea.css';            // Path to the skin (css) file relative to the extension dir
+       protected $htmlAreaRTE;                                 // Reference to the invoking object
+       protected $thisConfig;                                  // Reference to RTE PageTSConfig
+       protected $toolbar;                                     // Reference to RTE toolbar array
+       protected $LOCAL_LANG;                                  // Frontend language array
+       
+       protected $pluginButtons = 'user';
+       protected $convertToolbarForHtmlAreaArray = array (
+               'user'  => 'UserElements',
+               );
+       
+       /**
+        * Return JS configuration of the htmlArea plugins registered by the extension
+        *
+        * @param       integer         Relative id of the RTE editing area in the form
+        *
+        * @return      string          JS configuration for registered plugins, in this case, JS configuration of block elements
+        *
+        * The returned string will be a set of JS instructions defining the configuration that will be provided to the plugin(s)
+        * Each of the instructions should be of the form:
+        *      RTEarea['.$RTEcounter.']["buttons"]["button-id"]["property"] = "value";
+        */
+       public function buildJavascriptConfiguration($RTEcounter) {
+               
+               $registerRTEinJavascriptString = '';
+               $button = 'user';
+               if (in_array($button, $this->toolbar)) {
+                       if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$button.'.'])) {
+                                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .' = new Object();';
+                       }
+                       $registerRTEinJavascriptString .= '
+                       RTEarea['.$RTEcounter.'].buttons.'. $button .'.pathUserModule = "../../mod5/user.php";';
+               }
+               
+               return $registerRTEinJavascriptString;
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/UserElements/class.tx_rtehtmlarea_userelements.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/UserElements/class.tx_rtehtmlarea_userelements.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/extensions/UserElements/skin/htmlarea.css b/typo3/sysext/rtehtmlarea/extensions/UserElements/skin/htmlarea.css
new file mode 100644 (file)
index 0000000..ef9d7a8
--- /dev/null
@@ -0,0 +1,3 @@
+/* Selectors for the User Elements extension of htmlArea RTE */
+/* TYPO3 SVN ID: $Id$ */
+.htmlarea .toolbar .UserElements {background-image:url("images/user.gif");}
diff --git a/typo3/sysext/rtehtmlarea/extensions/UserElements/skin/images/user.gif b/typo3/sysext/rtehtmlarea/extensions/UserElements/skin/images/user.gif
new file mode 100644 (file)
index 0000000..351c41b
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/extensions/UserElements/skin/images/user.gif differ
index b412240..ef0bea9 100644 (file)
@@ -277,8 +277,6 @@ HTMLArea.Config = function () {
        this.editedContentStyle = _editor_edited_content_CSS;
                // content style
        this.pageStyle = "";
-               // set to true if you want Word code to be cleaned upon Paste
-       this.enableWordClean = true;
                // remove tags (these have to be a regexp, or null if this functionality is not desired)
        this.htmlRemoveTags = null;
                // remove tags and any contents (these have to be a regexp, or null if this functionality is not desired)
@@ -293,33 +291,23 @@ HTMLArea.Config = function () {
                // URL-s
        this.imgURL = "images/";
        this.popupURL = "popups/";
-
+       
        this.btnList = {
-               InsertOrderedList:      ["Ordered List", "ed_list_num.gif", false, function(editor) {editor.execCommand("InsertOrderedList");}],
-               InsertUnorderedList:    ["Bulleted List", "ed_list_bullet", false, function(editor) {editor.execCommand("InsertUnorderedList");}],
-               ForeColor:              ["Font Color", "ed_color_fg.gif",false, function(editor) {editor.execCommand("ForeColor");}],
-               HiliteColor:            ["Background Color", "ed_color_bg.gif",false, function(editor) {editor.execCommand("HiliteColor");}],
                InsertHorizontalRule:   ["Horizontal Rule", "ed_hr.gif",false, function(editor) {editor.execCommand("InsertHorizontalRule");}],
-               InsertTable:            ["Insert Table", "insert_table.gif", false, function(editor) {editor.execCommand("InsertTable");}],
                HtmlMode:               ["Toggle HTML Source", "ed_html.gif", true, function(editor) {editor.execCommand("HtmlMode");}],
                SelectAll:              ["SelectAll", "", true, function(editor) {editor.execCommand("SelectAll");}, null, true, false],
-               SplitBlock:             ["Toggle Container Block", "ed_splitblock.gif", false, function(editor) {editor.execCommand("SplitBlock");}],
                Undo:                   ["Undo the last action", "ed_undo.gif", false, function(editor) {editor.execCommand("Undo");}],
                Redo:                   ["Redo the last action", "ed_redo.gif", false, function(editor) {editor.execCommand("Redo");}],
                Cut:                    ["Cut selection", "ed_cut.gif", false, function(editor) {editor.execCommand("Cut");}],
                Copy:                   ["Copy selection", "ed_copy.gif", false, function(editor) {editor.execCommand("Copy");}],
-               Paste:                  ["Paste from clipboard", "ed_paste.gif", false, function(editor) {editor.execCommand("Paste");}],
-               SelectAll:              ["SelectAll", "", true, function(editor) {editor.execCommand("SelectAll");}, null, true, false],
-               LeftToRight:            ["Direction left to right", "ed_left_to_right.gif", false, function(editor) {editor.execCommand("LeftToRight");}],
-               RightToLeft:            ["Direction right to left", "ed_right_to_left.gif", false, function(editor) {editor.execCommand("RightToLeft");}]
+               Paste:                  ["Paste from clipboard", "ed_paste.gif", false, function(editor) {editor.execCommand("Paste");}]
        };
                // Default hotkeys
        this.hotKeyList = {
-               a:      { cmd:  "SelectAll",            action: null},
-               v:      { cmd:  "Paste",                action: null},
-               0:      { cmd:  "CleanWord",            action: null},
-               z:      { cmd:  "Undo",                 action: null},
-               y:      { cmd:  "Redo",                 action: null}
+               a:      { cmd:  "SelectAll",    action: null},
+               v:      { cmd:  "Paste",        action: null},
+               z:      { cmd:  "Undo",         action: null},
+               y:      { cmd:  "Redo",         action: null}
        };
 
                // Initialize tooltips from the I18N module, generate correct image path
@@ -514,25 +502,15 @@ HTMLArea.prototype.createSelect = function(txt,tb_line,first_cell_on_line,labelO
                        first : first_cell_on_line,
                        labelUsed : false
                };
-
-       switch (txt) {
-               case "FontSize":
-               case "FontName":
-                       options = this.config[txt.toLowerCase()];
-                       tooltip = HTMLArea.I18N.tooltips[txt.toLowerCase()];
-                       cmd = txt;
-                       break;
-               default:
-                       cmd = txt;
-                       var dropdown = this.config.customSelects[cmd];
-                       if (typeof(dropdown) != "undefined") {
-                               options = dropdown.options;
-                               context = dropdown.context;
-                               if (typeof(dropdown.tooltip) != "undefined") tooltip = dropdown.tooltip;
-                       }
-                       break;
-       }
-       if(options) {
+       
+       cmd = txt;
+       var dropdown = this.config.customSelects[cmd];
+       if (typeof(dropdown) != "undefined") {
+               options = dropdown.options;
+               context = dropdown.context;
+               if (typeof(dropdown.tooltip) != "undefined") tooltip = dropdown.tooltip;
+       }
+       if (options) {
                newObj["el"] = document.createElement("select");
                newObj["el"].className = "select";
                newObj["el"].title = tooltip;
@@ -561,10 +539,6 @@ HTMLArea.prototype.createSelect = function(txt,tb_line,first_cell_on_line,labelO
                                var op = document.createElement("option");
                                op.innerHTML = i;
                                op.value = options[i];
-                               if (txt == "FontName" && !this.config.disablePCexamples) {
-                                       if (HTMLArea.is_gecko) op.setAttribute("style", "font-family:" + op.value + ";");
-                                               else op.style.cssText = "font-family:" + op.value + ";";
-                               }
                                newObj["el"].appendChild(op);
                        }
                }
@@ -790,24 +764,16 @@ HTMLArea.toolBarButtonHandler = function(ev) {
                                break;
                        case "change":
                                editor.focusEditor();
-                               var value = target.options[target.selectedIndex].value;
-                               switch (obj.name) {
-                                       case "FontName":
-                                       case "FontSize":
-                                               editor.execCommand(obj.name, false, value);
-                                               break;
-                                       default:
-                                               var dropdown = editor.config.customSelects[obj.name];
-                                               if (typeof(dropdown) !== "undefined") {
-                                                       dropdown.action(editor, obj.name);
-                                                       HTMLArea._stopEvent(ev);
-                                                       if (HTMLArea.is_opera) {
-                                                               editor._iframe.focus();
-                                                       }
-                                                       editor.updateToolbar();
-                                               } else {
-                                                       HTMLArea._appendToLog("ERROR [HTMLArea::toolBarButtonHandler]: Combo box " + obj.name + " not registered.");
-                                               }
+                               var dropdown = editor.config.customSelects[obj.name];
+                               if (typeof(dropdown) !== "undefined") {
+                                       dropdown.action(editor, obj.name);
+                                       HTMLArea._stopEvent(ev);
+                                       if (HTMLArea.is_opera) {
+                                               editor._iframe.focus();
+                                       }
+                                       editor.updateToolbar();
+                               } else {
+                                       HTMLArea._appendToLog("ERROR [HTMLArea::toolBarButtonHandler]: Combo box " + obj.name + " not registered.");
                                }
                }
        }
@@ -1169,7 +1135,7 @@ HTMLArea.prototype.stylesLoaded = function() {
        }
 
                // set enableWordClean and intercept paste, dragdrop and drop events for wordClean
-       if (this.config.enableWordClean) HTMLArea._addEvents((HTMLArea.is_ie ? doc.body : doc), ["paste","dragdrop","drop"], HTMLArea.wordClean, true);
+       //if (this.config.enableWordClean) HTMLArea._addEvents((HTMLArea.is_ie ? doc.body : doc), ["paste","dragdrop","drop"], HTMLArea.wordClean, true);
 
        window.setTimeout("HTMLArea.generatePlugins(" + this._editorNumber + ");", 100);
 };
@@ -1224,10 +1190,6 @@ HTMLArea.resetHandler = function(ev) {
 HTMLArea.removeEditorEvents = function(ev) {
        if(!ev) var ev = window.event;
        HTMLArea._stopEvent(ev);
-       if (Dialog._modal) {
-               Dialog._modal.close();
-               Dialog._modal = null;
-       }
        for (var ed = RTEarea.length; --ed > 0 ;) {
                var editor = RTEarea[ed]["editor"];
                if(editor) {
@@ -1451,79 +1413,6 @@ HTMLArea.getInnerText = function(el) {
        return txt;
 };
 
-HTMLArea._wordClean = function(editor,html) {
-       function clearClass(node) {
-               var newc = node.className.replace(/(^|\s)mso.*?(\s|$)/ig,' ');
-               if(newc != node.className) {
-                       node.className = newc;
-                       if(!/\S/.test(node.className)) node.removeAttribute("className");
-               }
-       }
-       function clearStyle(node) {
-               if (HTMLArea.is_ie) var style = node.style.cssText;
-                       else var style = node.getAttribute("style");
-               if (style) {
-                       var declarations = style.split(/\s*;\s*/);
-                       for (var i = declarations.length; --i >= 0;) {
-                               if(/^mso|^tab-stops/i.test(declarations[i]) || /^margin\s*:\s*0..\s+0..\s+0../i.test(declarations[i])) declarations.splice(i,1);
-                       }
-                       node.setAttribute("style", declarations.join("; "));
-               }
-       }
-       function stripTag(el) {
-               if(HTMLArea.is_ie) {
-                       el.outerHTML = HTMLArea.htmlEncode(el.innerText);
-               } else {
-                       var txt = document.createTextNode(HTMLArea.getInnerText(el));
-                       el.parentNode.insertBefore(txt,el);
-                       el.parentNode.removeChild(el);
-               }
-       }
-       function checkEmpty(el) {
-               if(/^(span|b|strong|i|em|font)$/i.test(el.tagName) && !el.firstChild) el.parentNode.removeChild(el);
-       }
-       function parseTree(root) {
-               var tag = root.tagName.toLowerCase(), i, next;
-               if((HTMLArea.is_ie && root.scopeName != 'HTML') || (!HTMLArea.is_ie && /:/.test(tag)) || /o:p/.test(tag)) {
-                       stripTag(root);
-                       return false;
-               } else {
-                       clearClass(root);
-                       clearStyle(root);
-                       for (i=root.firstChild;i;i=next) {
-                               next = i.nextSibling;
-                               if(i.nodeType == 1 && parseTree(i)) { checkEmpty(i); }
-                       }
-               }
-               return true;
-       }
-       parseTree(html);
-};
-
-HTMLArea.wordCleanLater = function(editorNumber,doUpdateToolbar) {
-       var editor = RTEarea[editorNumber]["editor"];
-       HTMLArea._wordClean(editor, editor._doc.body);
-       if (doUpdateToolbar) editor.updateToolbar();
-};
-
-/*
- * Handler for paste, dragdrop and drop events
- */
-HTMLArea.wordClean = function(ev) {
-       if(!ev) var ev = window.event;
-       var target = (ev.target) ? ev.target : ev.srcElement;
-       var owner = (target.ownerDocument) ? target.ownerDocument : target;
-       while (HTMLArea.is_ie && owner.parentElement ) { // IE5.5 does not report any ownerDocument
-               owner = owner.parentElement;
-       }
-               // If we dropped an image dragged from the TYPO3 Image plugin, let's close the dialog window
-       if (typeof(HTMLArea.Dialog) != "undefined" && HTMLArea.Dialog.TYPO3Image) {
-                       HTMLArea.Dialog.TYPO3Image.close();
-       } else {
-               window.setTimeout("HTMLArea.wordCleanLater(" + owner._editorNo + ", true);", 250);
-       }
-};
-
 HTMLArea.prototype.forceRedraw = function() {
        this._doc.body.style.visibility = "hidden";
        this._doc.body.style.visibility = "visible";
@@ -1734,31 +1623,6 @@ HTMLArea.prototype.updateToolbar = function(noStatus) {
                                continue;
                        }
                        switch (cmd) {
-                               case "FontName":
-                               case "FontSize":
-                                       if(!text) try {
-                                               var value = ("" + doc.queryCommandValue(cmd)).trim().toLowerCase().replace(/\'/g, "");
-                                               if(!value) {
-                                                       document.getElementById(btn.elementId).selectedIndex = 0;
-                                                       break;
-                                               }
-                                                       // We rely on the fact that the variable in config has the same name as button name in the toolbar.
-                                               var options = this.config[cmd.toLowerCase()];
-                                               k = 0;
-                                               for (var j in options) {
-                                                       if (options.hasOwnProperty(j)) {
-                                                               if ((j.toLowerCase().indexOf(value) !== -1)
-                                                                               || (options[j].trim().substr(0, value.length).toLowerCase() == value)
-                                                                               || ((cmd === "FontName") && (options[j].toLowerCase().indexOf(value) !== -1))) {
-                                                                       document.getElementById(btn.elementId).selectedIndex = k;
-                                                                       throw "ok";
-                                                               }
-                                                               ++k;
-                                                       }
-                                               }
-                                               document.getElementById(btn.elementId).selectedIndex = 0;
-                                       } catch(e) {}
-                                       break;
                                case "TextIndicator":
                                        if(!text) {
                                                try {with (document.getElementById(btn.elementId).style) {
@@ -1778,14 +1642,6 @@ HTMLArea.prototype.updateToolbar = function(noStatus) {
                                        }
                                        break;
                                case "HtmlMode": btn.state("active", text); break;
-                               case "LeftToRight":
-                               case "RightToLeft":
-                                       if (!text) {
-                                               var el = this.getParentElement();
-                                               while (el && !HTMLArea.isBlockElement(el)) { el = el.parentNode; }
-                                               if (el) btn.state("active",(el.style.direction == ((cmd == "RightToLeft") ? "rtl" : "ltr")));
-                                       }
-                                       break;
                                case "Paste":
                                        if (!text) {
                                                try {
@@ -1795,13 +1651,8 @@ HTMLArea.prototype.updateToolbar = function(noStatus) {
                                                }
                                        }
                                        break;
-                               case "InsertOrderedList":
-                               case "InsertUnorderedList":
-                                       commandState = false;
-                                       if(!text) try { commandState = doc.queryCommandState(cmd); } catch(e) { commandState = false; }
-                                       btn.state("active",commandState);
+                               default:
                                        break;
-                               default: break;
                        }
                }
        }
@@ -1937,102 +1788,8 @@ HTMLArea.prototype._getFirstAncestor = function(sel,types) {
 };
 
 /***************************************************
- *  TABLES
- ***************************************************/
-/*
- * Get the insert table action function
- */
-HTMLArea.insertTableDialog = function(editor, sel, range) {
-       return (function(param) {
-               if(!param) return false;
-               var doc = editor._doc;
-               var table = doc.createElement("table");
-               for (var field in param) {
-                       if (param.hasOwnProperty(field)) {
-                               var value = param[field];
-                               if (value) {
-                                       switch (field) {
-                                               case "f_width"   : 
-                                                       if(value != "") {
-                                                               table.style.width = parseInt(value) + param["f_unit"];
-                                                               break;
-                                                       }
-                                               case "f_align"   :
-                                                       table.style.textAlign = value;
-                                                       break;
-                                               case "f_border"  :
-                                                       if(value != "") {
-                                                               table.style.borderWidth  = parseInt(value)+"px";
-                                                               table.style.borderStyle = "solid";
-                                                       }
-                                                       break;
-                                               case "f_spacing" :
-                                                       if(value != "") {
-                                                               table.cellSpacing = parseInt(value);
-                                                               break;
-                                                       }
-                                               case "f_padding" :
-                                                       if(value != "") {
-                                                               table.cellPadding = parseInt(value);
-                                                               break;
-                                                       }
-                                               case "f_float"   :
-                                                       if (HTMLArea.is_ie) {
-                                                               table.style.styleFloat = ((value != "not set") ? value : "");
-                                                       } else {
-                                                               table.style.cssFloat = ((value != "not set") ? value : "");
-                                                       }
-                                                       break;
-                                       }
-                               }
-                       }
-               }
-               var cellwidth = 0;
-               if(param.f_fixed) cellwidth = Math.floor(100 / parseInt(param.f_cols));
-               var tbody = doc.createElement("tbody");
-               table.appendChild(tbody);
-               for (var i = param["f_rows"]; i > 0; i--) {
-                       var tr = doc.createElement("tr");
-                       tbody.appendChild(tr);
-                       for (var j = param["f_cols"]; j > 0; j--) {
-                               var td = doc.createElement("td");
-                               if (cellwidth) td.style.width = cellwidth + "%";
-                               if (HTMLArea.is_opera) { td.innerHTML = '&nbsp;'; }
-                               tr.appendChild(td);
-                       }
-               }
-               editor.focusEditor();
-               if(HTMLArea.is_ie) range.pasteHTML(table.outerHTML);
-                       else editor.insertNodeAtSelection(table);
-               if (editor.config.buttons["toggleborders"] && editor.config.buttons["toggleborders"]["setOnTableCreation"]) editor.plugins["TableOperations"].instance.buttonPress(editor,"TO-toggle-borders");
-               if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) editor.setMode("wysiwyg");
-               editor.updateToolbar();
-               editor = null;
-               sel = null;
-               range = null;
-               return true;
-       });
-};
-
-/*
- * Process insert table request
- */
-HTMLArea.prototype._insertTable = function() {
-       var sel = this._getSelection();
-       var range = this._createRange(sel);
-       this.focusEditor();
-       var insertTableDialogFunctRef = HTMLArea.insertTableDialog(this, sel, range);
-       this._popupDialog("insert_table.html", insertTableDialogFunctRef, this, 520, 230);
-};
-
-/***************************************************
  *  Category: EVENT HANDLERS
  ***************************************************/
-HTMLArea.selectColorDialog = function(editor,cmdID) {
-       return (function(color) {
-               if(color) editor._doc.execCommand(cmdID, false, "#" + color);
-       });
-};
 
 /*
  * Intercept some commands and replace them with our own implementation
@@ -2040,68 +1797,34 @@ HTMLArea.selectColorDialog = function(editor,cmdID) {
 HTMLArea.prototype.execCommand = function(cmdID, UI, param) {
        this.focusEditor();
        switch (cmdID) {
-           case "HtmlMode"     : this.setMode(); break;
-           case "SplitBlock"   : this._doc.execCommand('FormatBlock',false,((HTMLArea.is_ie || HTMLArea.is_safari) ? "<div>" : "div")); break;
-           case "HiliteColor"  :
-               if (HTMLArea.is_ie || HTMLArea.is_safari) { cmdID = "BackColor"; }
-           case "ForeColor"    :
-               var colorDialogFunctRef = HTMLArea.selectColorDialog(this, cmdID);
-               this._popupDialog("select_color.html", colorDialogFunctRef, HTMLArea._colorToRgb(this._doc.queryCommandValue(cmdID)), 200, 182);
-               break;
-           case "Undo"         :
-           case "Redo"         :
-               if(this._customUndo) this[cmdID.toLowerCase()]();
-                       else this._doc.execCommand(cmdID,UI,param);
-               break;
-           case "InsertTable"  : this._insertTable(); break;
-           case "CleanWord"    : HTMLArea._wordClean(this, this._doc.body); break;
-           case "Cut"          :
-           case "Copy"         :
-           case "Paste"        :
-               try {
-                       this._doc.execCommand(cmdID, false, null);
-                       if (cmdID == "Paste" && this.config.enableWordClean) HTMLArea._wordClean(this, this._doc.body);
-               } catch (e) {
-                       if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) this._mozillaPasteException(cmdID, UI, param);
-               }
-               break;
-           case "LeftToRight"  :
-           case "RightToLeft"  :
-               var dir = (cmdID == "RightToLeft") ? "rtl" : "ltr";
-               var el = this.getParentElement();
-               while (el && !HTMLArea.isBlockElement(el)) el = el.parentNode;
-               if(el) {
-                       if(el.style.direction == dir) el.style.direction = "";
-                               else el.style.direction = dir;
-               }
-               break;
-           case "FontSize"     :
-           case "FontName"     :
-               if (param) {
-                       this._doc.execCommand(cmdID, UI, param);
+               case "HtmlMode" :
+                       this.setMode();
                        break;
-               } else {
-                       var sel = this._getSelection();
-                               // Find font and select it
-                       if (HTMLArea.is_gecko && sel.isCollapsed) {
-                               var fontNode = this._getFirstAncestor(sel, "font");
-                               if (fontNode != null) this.selectNode(fontNode);
+               case "Undo"     :
+               case "Redo"     :
+                       if(this._customUndo) this[cmdID.toLowerCase()]();
+                               else this._doc.execCommand(cmdID,UI,param);
+                       break;
+               case "Cut"      :
+               case "Copy"     :
+               case "Paste"    :
+                       try {
+                               this._doc.execCommand(cmdID, false, null);
+                               if (cmdID == "Paste" && this._toolbarObjects.CleanWord) {
+                                       this._toolbarObjects.CleanWord.cmd(this, "CleanWord");
+                               }
+                       } catch (e) {
+                               if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) {
+                                       this._mozillaPasteException(cmdID, UI, param);
+                               }
                        }
-                               // Remove format
-                       this._doc.execCommand("RemoveFormat", UI, null);
-                               // Collapse range if font was found
-                       if (HTMLArea.is_gecko && fontNode != null) {
-                               sel = this._getSelection();
-                               var r = this._createRange(sel).cloneRange();
-                               r.collapse(false);
-                               this.emptySelection(sel);
-                               this.addRangeToSelection(sel, r);
+                       break;
+               default         :
+                       try {
+                               this._doc.execCommand(cmdID, UI, param);
+                       } catch(e) {
+                               if (this.config.debug) alert(e + "\n\nby execCommand(" + cmdID + ");");
                        }
-               }
-               break;
-           default             :
-               try { this._doc.execCommand(cmdID, UI, param); }
-                       catch(e) { if (this.config.debug) alert(e + "\n\nby execCommand(" + cmdID + ");"); }
        }
        this.updateToolbar();
        return false;
@@ -2140,48 +1863,44 @@ HTMLArea._editorEvent = function(ev) {
                                        // execute hotkey command
                                var key = String.fromCharCode((HTMLArea.is_ie || HTMLArea.is_safari || HTMLArea.is_opera) ? ev.keyCode : ev.charCode).toLowerCase();
                                if (HTMLArea.is_gecko && ev.keyCode == 32) key = String.fromCharCode(ev.keyCode).toLowerCase();
-                               var cmd = null;
-                               var value = null;
-                               switch (key) {
-                                       case ' ':
-                                               editor.insertHTML("&nbsp;");
-                                               editor.updateToolbar();
-                                               HTMLArea._stopEvent(ev);
-                                               return false;
-                                               // other hotkeys
-                                       default:
-                                               if (editor.config.hotKeyList[key] && editor.config.hotKeyList[key].cmd) {
-                                                       switch (editor.config.hotKeyList[key].cmd) {
-                                                               case "SelectAll":
-                                                               case "CleanWord":
-                                                                       cmd = editor.config.hotKeyList[key].cmd;
-                                                                       break;
-                                                               case "Paste":
-                                                                       if (HTMLArea.is_ie || HTMLArea.is_safari) {
-                                                                               cmd = editor.config.hotKeyList[key].cmd;
-                                                                       } else if (editor.config.enableWordClean) {
-                                                                               window.setTimeout("HTMLArea.wordCleanLater(" + owner._editorNo + ", false);", 50);
-                                                                       }
-                                                                       break;
-                                                               default:
-                                                                       if (editor._toolbarObjects[editor.config.hotKeyList[key].cmd]) {
-                                                                               cmd = editor.config.hotKeyList[key].cmd;
-                                                                       }
-                                                       }
-                                               }
-                               }
-                               if(cmd && !(editor.config.hotKeyList[key] && editor.config.hotKeyList[key].action)) {
-                                       editor.execCommand(cmd, false, value);
+                               if (key == " ") {
+                                       editor.insertHTML("&nbsp;");
+                                       editor.updateToolbar();
                                        HTMLArea._stopEvent(ev);
                                        return false;
-                               } else {
-                                       if (editor.config.hotKeyList[key] && editor.config.hotKeyList[key].action) {
-                                               if (!editor.config.hotKeyList[key].action(editor, key)) {
+                               }
+                               if (!editor.config.hotKeyList[key]) return false;
+                               var cmd = editor.config.hotKeyList[key].cmd;
+                               if (!cmd) return false;
+                               switch (cmd) {
+                                       case "SelectAll":
+                                       case "Undo"     :
+                                       case "Redo"     :
+                                               cmd = editor.config.hotKeyList[key].cmd;
+                                               editor.execCommand(cmd, false, null);
+                                               HTMLArea._stopEvent(ev);
+                                               return false;
+                                               break;
+                                       case "Paste"    :
+                                               if (HTMLArea.is_ie || HTMLArea.is_safari) {
+                                                       cmd = editor.config.hotKeyList[key].cmd;
+                                                       editor.execCommand(cmd, false, null);
                                                        HTMLArea._stopEvent(ev);
                                                        return false;
+                                               } else if (editor._toolbarObjects.CleanWord) {
+                                                       var cleanLaterFunctRef = editor.plugins.DefaultClean ? editor.plugins.DefaultClean.instance.cleanLaterFunctRef : (editor.plugins.TYPO3HtmlParser ? editor.plugins.TYPO3HtmlParser.instance.cleanLaterFunctRef : null);
+                                                       if (cleanLaterFunctRef) {
+                                                               window.setTimeout(cleanLaterFunctRef, 50);
+                                                       }
+                                               }
+                                               break;
+                                       default:
+                                               if (editor.config.hotKeyList[key] && editor.config.hotKeyList[key].action) {
+                                                       if (!editor.config.hotKeyList[key].action(editor, key)) {
+                                                               HTMLArea._stopEvent(ev);
+                                                               return false;
+                                                       }
                                                }
-                                       }
-                                       editor.updateToolbar();
                                }
                        }
                } else if (ev.altKey) {
@@ -2754,96 +2473,6 @@ HTMLArea._postback = function(url, data, handler, addParams, charset) {
        }
 };
 
-/***************************************************
- *  MODAL DIALOG
- ***************************************************/
-/*
- * Modal dialog pseudo-object
- */
-Dialog = function(url, action, init, width, height, opener, editor, scrollbars) {
-       Dialog._open(url, action, init, (width?width:100), (height?height:100), opener, editor, scrollbars);
-};
-
-/*
- * Open modal popup window
- */
-Dialog._open = function(url, action, init, width, height, _opener, editor, scrollbars) {
-
-       if (typeof(Dialog._modal) == "object" && typeof(Dialog._modal.close) == "function") {
-               Dialog._modal.close();
-               Dialog._modal = null;
-       }
-
-       var dlg = window.open(url, 'hadialog', "toolbar=no,location=no,directories=no,menubar=no,width=" + width + ",height=" + height + ",scrollbars=" + scrollbars + ",resizable=yes,modal=yes,dependent=yes,top=100,left=100");
-       var obj = new Object();
-       obj.dialogWindow = dlg;
-       Dialog._dialog = obj;
-       Dialog._modal = dlg;
-       Dialog._arguments = null;
-       if (typeof(init) != "undefined") { Dialog._arguments = init; }
-
-                               // Capture focus events
-       function capwin(w) {
-               if (HTMLArea.is_gecko) { w.addEventListener("focus", function(ev) { Dialog._parentEvent(ev); }, false); }
-                       else { HTMLArea._addEvent(w, "focus", function(ev) { Dialog._parentEvent(ev); }); }
-               for (var i=0;i < w.frames.length;i++) { capwin(w.frames[i]); }
-       }
-       capwin(window);
-
-               // Close dialog window
-       function closeDialog() {
-               if (Dialog._dialog && Dialog._dialog.dialogWindow) {
-                       Dialog._dialog.dialogWindow.close();
-                       Dialog._dialog = null;
-               }
-               if (dlg && !dlg.closed) {
-                       dlg.close();
-                       dlg = null;
-               }
-               return false;
-       }
-
-               // make up a function to be called when the Dialog ends.
-       Dialog._return = function (val) {
-               if(val && action) { action(val); }
-
-                       // release the captured events
-               function relwin(w) {
-                       HTMLArea._removeEvent(w, "focus", function(ev) { Dialog._parentEvent(ev); });
-                       try { for (var i=0;i < w.frames.length;i++) { relwin(w.frames[i]); } } catch(e) { }
-               }
-               relwin(window);
-
-               HTMLArea._removeEvent(window, "unload", closeDialog);
-               Dialog._dialog = null;
-       };
-
-               // capture unload events
-       HTMLArea._addEvent(dlg, "unload", function() { if (typeof(Dialog) != "undefined") Dialog._return(null); return false; });
-       HTMLArea._addEvent(window, "unload", closeDialog);
-};
-
-Dialog._parentEvent = function(ev) {
-       if (Dialog._modal && !Dialog._modal.closed) {
-               if (!ev) var ev = window.event;
-               var target = (ev.target) ? ev.target : ev.srcElement;
-               Dialog._modal.focus();
-               HTMLArea._stopEvent(ev);
-       }
-       return false;
-};
-
-/*
- * Request modal dialog
- * Receives an URL to the popup dialog, an action function that receives one value and an initialization object.
- * The action function will get called after the dialog is closed, with the return value of the dialog.
- */
-HTMLArea.prototype._popupDialog = function(url, action, init, width, height, _opener, scrollbars) {
-       if (typeof(_opener) == "undefined" || !_opener) var _opener = (this._iframe.contentWindow ? this._iframe.contentWindow : window);
-       if (typeof(scrollbars) == "undefined") var scrollbars = "no";
-       Dialog(this.popupURL(url), action, init, width, height, _opener, this, scrollbars);
-};
-
 /**
  * Internet Explorer returns an item having the _name_ equal to the given id, even if it's not having any id.
  * This way it can return a different form field even if it's not a textarea.  This works around the problem by
@@ -2857,14 +2486,6 @@ HTMLArea.getElementById = function(tag, id) {
        return null;
 };
 
-/*
- * Hide the popup window
- */
-HTMLArea.edHidePopup = function() {
-       Dialog._modal.close();
-       setTimeout( "if (typeof(browserWin) != 'undefined' && typeof(browserWin.focus) == 'function') browserWin.focus();", 200);
-};
-
 /***************************************************
  * TYPO3-SPECIFIC FUNCTIONS
  ***************************************************/
@@ -3363,7 +2984,7 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
         * @return      boolean
         */
        onMode : function(mode) {
-               if (this.dialog && mode === "textmode" && !this.editorConfiguration.btnList[this.dialog.buttonId].textMode) {
+               if (this.dialog && mode === "textmode" && !(this.dialog.buttonId && this.editorConfiguration.btnList[this.dialog.buttonId] && this.editorConfiguration.btnList[this.dialog.buttonId].textMode)) {
                        this.dialog.close();
                }
        },
@@ -3428,6 +3049,19 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
        },
        
        /**
+        * Post data to the server
+        *
+        * @param       string          url: url to post data to
+        * @param       object          data: data to be posted
+        * @param       function        handler: function that will handle the response returned by the server
+        *
+        * @return      boolean         true on success
+        */
+        postData : function (url, data, handler) {
+                HTMLArea._postback(url, data, handler, this.editorConfiguration.RTEtsConfigParams, (this.editorConfiguration.typo3ContentCharset ? this.editorConfiguration.typo3ContentCharset : "utf-8"));
+        },
+       
+       /**
         * Open a dialog window or bring focus to it if is already opened
         *
         * @param       string          buttonId: buttonId requesting the opening of the dialog
@@ -3458,7 +3092,7 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
                                        url,
                                        actionFunctionReference,
                                        arguments,
-                                       {width: (dimensions.width?dimensions.width:100), height: (dimensions.height?dimensions.height:100)},
+                                       {width: ((dimensions && dimensions.width)?dimensions.width:100), height: ((dimensions && dimensions.height)?dimensions.height:100)},
                                        (showScrollbars?showScrollbars:"no")
                                );
                }
@@ -3484,7 +3118,7 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
         * @return      string          the url
         */
        makeUrlFromModulePath : function(modulePath, parameters) {
-               return this.editor.popupURL(modulePath + "?" + RTEarea[this.editorNumber]["RTEtsConfigParams"] + "&editorNo=" + this.editorNumber + "&sys_language_content=" + this.editorConfiguration.sys_language_content + "&contentTypo3Language=" + this.editorConfiguration.typo3ContentLanguage + "&contentTypo3Charset=" + encodeURIComponent(this.editorConfiguration.typo3ContentCharset) + (parameters?parameters:''));
+               return this.editor.popupURL(modulePath + "?" + this.editorConfiguration.RTEtsConfigParams + "&editorNo=" + this.editorNumber + "&sys_language_content=" + this.editorConfiguration.sys_language_content + "&contentTypo3Language=" + this.editorConfiguration.typo3ContentLanguage + "&contentTypo3Charset=" + encodeURIComponent(this.editorConfiguration.typo3ContentCharset) + (parameters?parameters:''));
        },
        
        /**
@@ -3797,13 +3431,13 @@ HTMLArea.Dialog = HTMLArea.Base.extend({
         *
         * @return      void
         */     
-       captureEvents : function () {
+       captureEvents : function (skipUnload) {
                this.unloadFunctionReference = this.makeFunctionReference("close");
                HTMLArea._addEvent(this.dialogWindow.opener, "unload", this.unloadFunctionReference);
                if (HTMLArea.is_gecko && this.plugin.editor._iframe.contentWindow) {
                        HTMLArea._addEvent(this.plugin.editor._iframe.contentWindow, "unload", this.unloadFunctionReference);
                }
-               HTMLArea._addEvent(this.dialogWindow, "unload", this.unloadFunctionReference);
+               if (!skipUnload) HTMLArea._addEvent(this.dialogWindow, "unload", this.unloadFunctionReference);
                this.escapeFunctionReference = this.makeFunctionReference("closeOnEscape");
                HTMLArea._addEvent(this.dialogWindow.document, "keypress", this.escapeFunctionReference);
         },
index cea38a5..fe450d0 100644 (file)
@@ -43,6 +43,7 @@ BlockElements = HTMLArea.Plugin.extend({
                /*
                 * Setting up some properties from PageTSConfig
                 */
+               this.buttonsConfiguration = this.editorConfiguration.buttons;
                this.useClass = {
                        Indent          : "indent",
                        JustifyLeft     : "align-left",
@@ -141,7 +142,7 @@ BlockElements = HTMLArea.Plugin.extend({
                                tooltip         : this.localize(buttonId + "-Tooltip"),
                                action          : "onButtonPress",
                                context         : button[1],
-                               hotKey          : button[2]
+                               hotKey          : (this.buttonsConfiguration[button[3]] ? this.buttonsConfiguration[button[3]].hotKey : (button[2] ? button[2] : null))
                        };
                        this.registerButton(buttonConfiguration);
                }
@@ -153,15 +154,17 @@ BlockElements = HTMLArea.Plugin.extend({
         * The list of buttons added by this plugin
         */
        buttonList : [
-               ["Indent", null, "TAB"],
-               ["Outdent", null, "SHIFT-TAB"],
-               ["Blockquote", null, null],
-               ["InsertParagraphBefore", null, null],
-               ["InsertParagraphAfter", null, null],
-               ["JustifyLeft", null, "l"],
-               ["JustifyCenter", null, "e"],
-               ["JustifyRight", null, "r"],
-               ["JustifyFull", null, "j"]
+               ["Indent", null, "TAB", "indent"],
+               ["Outdent", null, "SHIFT-TAB", "outdent"],
+               ["Blockquote", null, null, "blockquote"],
+               ["InsertParagraphBefore", null, null, "insertparagraphbefore"],
+               ["InsertParagraphAfter", null, null, "insertparagraphafter"],
+               ["JustifyLeft", null, "l", "left"],
+               ["JustifyCenter", null, "e", "center"],
+               ["JustifyRight", null, "r", "right"],
+               ["JustifyFull", null, "j", "justifyfull"],
+               ["InsertOrderedList", null, null, "orderedlist"],
+               ["InsertUnorderedList", null, null, "unorderedlist"]
        ],
        
        /*
@@ -421,6 +424,14 @@ BlockElements = HTMLArea.Plugin.extend({
                                        this.addClassOnBlockElements(buttonId);
                                }
                                break;
+                       case "InsertOrderedList":
+                       case "InsertUnorderedList":
+                               try {
+                                       this.editor._doc.execCommand(buttonId, false, null);
+                               } catch(e) {
+                                       this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
+                               }
+                               break;
                        case "none" :
                                if (this.allowedBlockElements.test(parentElement.nodeName)) {
                                        this.removeElement(parentElement);
@@ -749,6 +760,15 @@ BlockElements = HTMLArea.Plugin.extend({
                                                }
                                                this.editor._toolbarObjects[buttonId].state("active", commandState);
                                                break;
+                                       case "InsertOrderedList":
+                                       case "InsertUnorderedList":
+                                               try {
+                                                       commandState = this.editor._doc.queryCommandState(buttonId);
+                                               } catch(e) {
+                                                       commandState = false;
+                                               }
+                                               this.editor._toolbarObjects[buttonId].state("active", commandState);
+                                               break;
                                        default :
                                                break;
                                }
index e01a800..6fa0a09 100644 (file)
@@ -18,6 +18,8 @@
                        <label index="JustifyRight-Tooltip">Justify right</label>
                        <label index="JustifyFull-Tooltip">Justify left and right</label>
                        <label index="Left-Tooltip">Left</label>
+                       <label index="InsertOrderedList-Tooltip">Ordered List</label>
+                       <label index="InsertUnorderedList-Tooltip">Bulleted List</label>
                        <label index="No block">No block format</label>
                        <label index="Remove block">Remove block format</label>
                        <label index="Technische Universitat Ilmenau">Technische Universität Ilmenau</label>
index 0a76197..5ac68d1 100644 (file)
@@ -72,7 +72,7 @@ ContextMenu.contextMenuHandler = function(instance) {
 
 ContextMenu.tableOperationsHandler = function(editor,tbo,opcode) {
        return (function() {
-               tbo.buttonPress(editor,opcode);
+               tbo.onButtonPress(editor,opcode);
        });
 };
 
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js
new file mode 100644 (file)
index 0000000..55f885d
--- /dev/null
@@ -0,0 +1,171 @@
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Default Clean Plugin for TYPO3 htmlArea RTE
+ *
+ * TYPO3 SVN ID: $Id: default-clean.js 2663 2007-11-05 09:22:23Z ingmars $
+ */
+DefaultClean = HTMLArea.Plugin.extend({
+       
+       constructor : function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin : function(editor) {
+               
+               this.pageTSConfiguration = this.editorConfiguration.buttons.cleanword;
+               this.cleanLaterFunctRef = this.makeFunctionReference("cleanLater");
+               
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : "1.0",
+                       developer       : "Stanislas Rolland",
+                       developerUrl    : "http://www.fructifor.ca/",
+                       copyrightOwner  : "Stanislas Rolland",
+                       sponsor         : "Fructifor Inc.",
+                       sponsorUrl      : "http://www.fructifor.ca/",
+                       license         : "GPL"
+               };
+               this.registerPluginInformation(pluginInformation);
+               
+               /*
+                * Registering the (hidden) button
+                */
+               var buttonId = "CleanWord";
+               var buttonConfiguration = {
+                       id              : buttonId,
+                       tooltip         : this.localize(buttonId + "-Tooltip"),
+                       action          : "onButtonPress",
+                       hide            : true
+               };
+               this.registerButton(buttonConfiguration);
+       },
+       
+       /*
+        * This function gets called when the button was pressed.
+        *
+        * @param       object          editor: the editor instance
+        * @param       string          id: the button id or the key
+        *
+        * @return      boolean         false if action is completed
+        */
+       onButtonPress : function (editor, id, target) {
+                       // Could be a button or its hotkey
+               var buttonId = this.translateHotKey(id);
+               buttonId = buttonId ? buttonId : id;
+               
+               this.clean(this.editor._doc.body);
+               return false;
+       },
+       
+       onGenerate : function () {
+               var doc = this.editor._doc;
+               var cleanFunctRef = this.makeFunctionReference("wordCleanHandler");
+               HTMLArea._addEvents((HTMLArea.is_ie ? doc.body : doc), ["paste","dragdrop","drop"], cleanFunctRef, true);
+       },
+       
+       clean : function (html) {
+               function clearClass(node) {
+                       var newc = node.className.replace(/(^|\s)mso.*?(\s|$)/ig,' ');
+                       if(newc != node.className) {
+                               node.className = newc;
+                               if(!/\S/.test(node.className)) node.removeAttribute("className");
+                       }
+               }
+               function clearStyle(node) {
+                       if (HTMLArea.is_ie) var style = node.style.cssText;
+                               else var style = node.getAttribute("style");
+                       if (style) {
+                               var declarations = style.split(/\s*;\s*/);
+                               for (var i = declarations.length; --i >= 0;) {
+                                       if(/^mso|^tab-stops/i.test(declarations[i]) || /^margin\s*:\s*0..\s+0..\s+0../i.test(declarations[i])) declarations.splice(i,1);
+                               }
+                               node.setAttribute("style", declarations.join("; "));
+                       }
+               }
+               function stripTag(el) {
+                       if(HTMLArea.is_ie) {
+                               el.outerHTML = HTMLArea.htmlEncode(el.innerText);
+                       } else {
+                               var txt = document.createTextNode(HTMLArea.getInnerText(el));
+                               el.parentNode.insertBefore(txt,el);
+                               el.parentNode.removeChild(el);
+                       }
+               }
+               function checkEmpty(el) {
+                       if(/^(span|b|strong|i|em|font)$/i.test(el.tagName) && !el.firstChild) el.parentNode.removeChild(el);
+               }
+               function parseTree(root) {
+                       var tag = root.tagName.toLowerCase(), i, next;
+                       if((HTMLArea.is_ie && root.scopeName != 'HTML') || (!HTMLArea.is_ie && /:/.test(tag)) || /o:p/.test(tag)) {
+                               stripTag(root);
+                               return false;
+                       } else {
+                               clearClass(root);
+                               clearStyle(root);
+                               for (i=root.firstChild;i;i=next) {
+                                       next = i.nextSibling;
+                                       if(i.nodeType == 1 && parseTree(i)) { checkEmpty(i); }
+                               }
+                       }
+                       return true;
+               }
+               parseTree(html);
+       },
+       
+       cleanLater : function () {
+               this.clean(this.editor._doc.body);
+               if (this.doUpdateToolbar) {
+                       this.editor.updateToolbar();
+               }
+               this.doUpdateToolbar = false;
+       },
+       
+       /*
+       * Handler for paste, dragdrop and drop events
+       */
+       wordCleanHandler : function (ev) {
+               if(!ev) var ev = window.event;
+               var target = (ev.target) ? ev.target : ev.srcElement;
+               var owner = (target.ownerDocument) ? target.ownerDocument : target;
+               while (HTMLArea.is_ie && owner.parentElement ) { // IE5.5 does not report any ownerDocument
+                       owner = owner.parentElement;
+               }
+                       // If we dropped an image dragged from the TYPO3 Image plugin, let's close the dialog window
+               if (typeof(HTMLArea.Dialog) != "undefined" && HTMLArea.Dialog.TYPO3Image) {
+                       HTMLArea.Dialog.TYPO3Image.close();
+               } else {
+                       this.doUpdateToolbar = false;
+                       window.setTimeout(this.cleanLaterFunctRef, 250);
+               }
+       }
+});
+
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/locallang.xml b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/locallang.xml
new file mode 100644 (file)
index 0000000..143438b
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+       <meta type="array">
+               <description>Labels for Default Clean plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="CleanWord-Tooltip">Clean up HTML content</label>
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/default-color.js b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/default-color.js
new file mode 100644 (file)
index 0000000..48dd47a
--- /dev/null
@@ -0,0 +1,152 @@
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This script is a modified version of a script published under the htmlArea License.
+*  A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/*
+ * Default Color Plugin for TYPO3 htmlArea RTE
+ *
+ * TYPO3 SVN ID: $Id: $
+ */
+DefaultColor = HTMLArea.Plugin.extend({
+       
+       constructor : function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin : function(editor) {
+               
+               this.buttonsConfiguration = this.editorConfiguration.buttons;
+               
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : "1.0",
+                       developer       : "Stanislas Rolland",
+                       developerUrl    : "http://www.fructifor.ca/",
+                       copyrightOwner  : "Stanislas Rolland",
+                       sponsor         : "Fructifor Inc.",
+                       sponsorUrl      : "http://www.fructifor.ca/",
+                       license         : "GPL"
+               };
+               this.registerPluginInformation(pluginInformation);
+               
+               /*
+                * Registering the buttons
+                */
+               var buttonList = this.buttonList;
+               for (var i = 0; i < buttonList.length; ++i) {
+                       var button = buttonList[i];
+                       buttonId = button[0];
+                       var buttonConfiguration = {
+                               id              : buttonId,
+                               tooltip         : this.localize(buttonId.toLowerCase()),
+                               action          : "onButtonPress",
+                               hotKey          : (this.buttonsConfiguration[button[1]] ? this.buttonsConfiguration[button[1]].hotKey : null),
+                               dialog          : true
+                       };
+                       this.registerButton(buttonConfiguration);
+               }
+               
+               return true;
+        },
+        
+       /*
+        * The list of buttons added by this plugin
+        */
+       buttonList : [
+               ["ForeColor", "textcolor"],
+               ["HiliteColor", "bgcolor"]
+       ],
+        
+       /*
+        * This function gets called when the button was pressed.
+        *
+        * @param       object          editor: the editor instance
+        * @param       string          id: the button id or the key
+        * @param       object          target: the target element of the contextmenu event, when invoked from the context menu
+        *
+        * @return      boolean         false if action is completed
+        */
+       onButtonPress : function(editor, id, target) {
+                       // Could be a button or its hotkey
+               var buttonId = this.translateHotKey(id);
+               buttonId = buttonId ? buttonId : id;
+               
+               this.commandId = buttonId;
+               
+               switch (buttonId) {
+                       case "HiliteColor"      :
+                               if (HTMLArea.is_ie || HTMLArea.is_safari) {
+                                       this.commandId = "BackColor";
+                               }
+                       case "ForeColor"        :
+                               this.dialog = this.openDialog(buttonId, this.makeUrlFromPopupName("select_color"), "setColor", HTMLArea._colorToRgb(this.editor._doc.queryCommandValue(this.commandId)), {width:200, height:182});
+                               break;
+                       default:
+                               this.dialog = this.openDialog(buttonId, this.makeUrlFromPopupName("select_color"), "returnToCaller", HTMLArea._colorToRgb("000000"), {width:200, height:182});
+                               break;
+               }
+               return false;
+       },
+       
+       /*
+        * Set the color
+        *
+        * @param       object          param: the returned color
+        *
+        * @return      boolean         false
+        */
+       setColor : function(color) {
+               this.editor.focusEditor();
+               if (color) {
+                       this.editor._doc.execCommand(this.commandId, false, "#" + color);
+               }
+               return false;
+       },
+       
+       /*
+        * Return to caller
+        *
+        * @param       object          param: the returned color
+        *
+        * @return      boolean         false
+        */
+       returnToCaller : function(color) {
+               if (color && this.editor.plugins[this.commandId]
+                               && this.editor.plugins[this.commandId].instance
+                               && this.editor.plugins[this.commandId].instance.dialog
+                               && this.editor.plugins[this.commandId].instance.dialog.dialogWindow) {
+                       this.editor.plugins[this.commandId].instance.dialog.dialogWindow.insertColor("#" + color);
+               }
+               return false;
+       }
+});
+
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/locallang.xml b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/locallang.xml
new file mode 100644 (file)
index 0000000..e2c5d9f
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- TYPO3 SVN ID: $Id:$ -->
+<T3locallang>
+       <meta type="array">
+               <description>Labels for Default Color plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="Invalid color code">Invalid color code</label>
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/popups/select_color.html b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/popups/select_color.html
new file mode 100644 (file)
index 0000000..088d9ce
--- /dev/null
@@ -0,0 +1,388 @@
+<html class="popupwin">
+<!-- 
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2002-2004, interactivetools.com, inc.
+*  (c) 2003-2004 dynarch.com
+*  (c) 2004-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This script is a modified version of a script published under the htmlArea License.
+*  A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/*
+ * Default Color window for TYPO3 htmlArea RTE
+ *
+ * TYPO3 SVN ID: $Id: $
+ */
+-->
+<head>
+       <title>Select Color</title>
+       <meta http-equiv="Content-Style-Type" content="text/css" />
+       <script type="text/javascript">
+               /*<![CDATA[*/
+               <!--
+               var dialog = window.opener.HTMLArea.Dialog.DefaultColor;
+               function Init() {
+                       dialog.initialize(false, true);
+                       var color = dialog.arguments;
+                       color = ValidateColor(color) || '000000';
+                       View(color);            // set default color
+               }
+               
+               function View(color) {          // preview color
+                       document.getElementById("ColorPreview").style.backgroundColor = '#' + color;
+                       document.getElementById("ColorHex").value = '#' + color;
+               }
+               
+               function Set(string) {          // select color
+                       var color = ValidateColor(string);
+                       if (color == null) {
+                               alert(dialog.plugin.localize("Invalid color code") + ": " + string); // invalid color
+                       } else {
+                               View(color);    // show selected color
+                               dialog.performAction(color);
+                               dialog.close();
+                       }
+               }
+               
+               function ValidateColor(string) {        // return valid color code
+                       string = string || '';
+                       string = string + "";
+                       string = string.toUpperCase();
+                       var chars = '0123456789ABCDEF';
+                       var out   = '';
+                       
+                       for (var i = 0; i < string.length; i++) {       // remove invalid color chars
+                               var schar = string.charAt(i);
+                               if (chars.indexOf(schar) != -1) { out += schar; }
+                       }
+                       
+                       if (out.length != 6) { return null; }            // check length
+                       return out;
+               }
+               // -->
+               /*]]>*/
+       </script>
+       <style type="text/css">
+               /*<![CDATA[*/
+               <!--
+               .color { width: 10px; height: 10px; cursor: pointer; }
+               // -->
+               /*]]>*/
+       </style>
+</head>
+<body style="background:ButtonFace; margin:0; padding:0;" onload="Init();">
+<div id="content">
+<form method="get" style="margin:0px; padding:0px;" onSubmit="Set(document.getElementById('ColorHex').value); return false;">
+<table cellspacing="0" cellpadding="4" style="border-style: none; width: 100%;">
+ <tr>
+  <td style="background:buttonface;" valign=center><div style="background-color: #000000; padding: 1; height: 21px; width: 50px;"><div id="ColorPreview" style="height: 100%; width: 100%;"></div></div></td>
+  <td style="background:buttonface;" valign=center><input type="text" name="ColorHex" id="ColorHex" value="" size=15 style="font-size: 12px;" /></td>
+  <td style="background:buttonface; width: 100%;"></td>
+ </tr>
+</table>
+</form>
+
+<table cellspacing="1" cellpadding="0" style="border-style: none; width:100%; background-color: #000000; margin-bottom: 5px;">
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#003300" onMouseOver="View('003300');" onClick="Set('003300');"></td>
+<td class="color" bgcolor="#006600" onMouseOver="View('006600');" onClick="Set('006600');"></td>
+<td class="color" bgcolor="#009900" onMouseOver="View('009900');" onClick="Set('009900');"></td>
+<td class="color" bgcolor="#00CC00" onMouseOver="View('00CC00');" onClick="Set('00CC00');"></td>
+<td class="color" bgcolor="#00FF00" onMouseOver="View('00FF00');" onClick="Set('00FF00');"></td>
+<td class="color" bgcolor="#330000" onMouseOver="View('330000');" onClick="Set('330000');"></td>
+<td class="color" bgcolor="#333300" onMouseOver="View('333300');" onClick="Set('333300');"></td>
+<td class="color" bgcolor="#336600" onMouseOver="View('336600');" onClick="Set('336600');"></td>
+<td class="color" bgcolor="#339900" onMouseOver="View('339900');" onClick="Set('339900');"></td>
+<td class="color" bgcolor="#33CC00" onMouseOver="View('33CC00');" onClick="Set('33CC00');"></td>
+<td class="color" bgcolor="#33FF00" onMouseOver="View('33FF00');" onClick="Set('33FF00');"></td>
+<td class="color" bgcolor="#660000" onMouseOver="View('660000');" onClick="Set('660000');"></td>
+<td class="color" bgcolor="#663300" onMouseOver="View('663300');" onClick="Set('663300');"></td>
+<td class="color" bgcolor="#666600" onMouseOver="View('666600');" onClick="Set('666600');"></td>
+<td class="color" bgcolor="#669900" onMouseOver="View('669900');" onClick="Set('669900');"></td>
+<td class="color" bgcolor="#66CC00" onMouseOver="View('66CC00');" onClick="Set('66CC00');"></td>
+<td class="color" bgcolor="#66FF00" onMouseOver="View('66FF00');" onClick="Set('66FF00');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#333333" onMouseOver="View('333333');" onClick="Set('333333');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#000033" onMouseOver="View('000033');" onClick="Set('000033');"></td>
+<td class="color" bgcolor="#003333" onMouseOver="View('003333');" onClick="Set('003333');"></td>
+<td class="color" bgcolor="#006633" onMouseOver="View('006633');" onClick="Set('006633');"></td>
+<td class="color" bgcolor="#009933" onMouseOver="View('009933');" onClick="Set('009933');"></td>
+<td class="color" bgcolor="#00CC33" onMouseOver="View('00CC33');" onClick="Set('00CC33');"></td>
+<td class="color" bgcolor="#00FF33" onMouseOver="View('00FF33');" onClick="Set('00FF33');"></td>
+<td class="color" bgcolor="#330033" onMouseOver="View('330033');" onClick="Set('330033');"></td>
+<td class="color" bgcolor="#333333" onMouseOver="View('333333');" onClick="Set('333333');"></td>
+<td class="color" bgcolor="#336633" onMouseOver="View('336633');" onClick="Set('336633');"></td>
+<td class="color" bgcolor="#339933" onMouseOver="View('339933');" onClick="Set('339933');"></td>
+<td class="color" bgcolor="#33CC33" onMouseOver="View('33CC33');" onClick="Set('33CC33');"></td>
+<td class="color" bgcolor="#33FF33" onMouseOver="View('33FF33');" onClick="Set('33FF33');"></td>
+<td class="color" bgcolor="#660033" onMouseOver="View('660033');" onClick="Set('660033');"></td>
+<td class="color" bgcolor="#663333" onMouseOver="View('663333');" onClick="Set('663333');"></td>
+<td class="color" bgcolor="#666633" onMouseOver="View('666633');" onClick="Set('666633');"></td>
+<td class="color" bgcolor="#669933" onMouseOver="View('669933');" onClick="Set('669933');"></td>
+<td class="color" bgcolor="#66CC33" onMouseOver="View('66CC33');" onClick="Set('66CC33');"></td>
+<td class="color" bgcolor="#66FF33" onMouseOver="View('66FF33');" onClick="Set('66FF33');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#666666" onMouseOver="View('666666');" onClick="Set('666666');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#000066" onMouseOver="View('000066');" onClick="Set('000066');"></td>
+<td class="color" bgcolor="#003366" onMouseOver="View('003366');" onClick="Set('003366');"></td>
+<td class="color" bgcolor="#006666" onMouseOver="View('006666');" onClick="Set('006666');"></td>
+<td class="color" bgcolor="#009966" onMouseOver="View('009966');" onClick="Set('009966');"></td>
+<td class="color" bgcolor="#00CC66" onMouseOver="View('00CC66');" onClick="Set('00CC66');"></td>
+<td class="color" bgcolor="#00FF66" onMouseOver="View('00FF66');" onClick="Set('00FF66');"></td>
+<td class="color" bgcolor="#330066" onMouseOver="View('330066');" onClick="Set('330066');"></td>
+<td class="color" bgcolor="#333366" onMouseOver="View('333366');" onClick="Set('333366');"></td>
+<td class="color" bgcolor="#336666" onMouseOver="View('336666');" onClick="Set('336666');"></td>
+<td class="color" bgcolor="#339966" onMouseOver="View('339966');" onClick="Set('339966');"></td>
+<td class="color" bgcolor="#33CC66" onMouseOver="View('33CC66');" onClick="Set('33CC66');"></td>
+<td class="color" bgcolor="#33FF66" onMouseOver="View('33FF66');" onClick="Set('33FF66');"></td>
+<td class="color" bgcolor="#660066" onMouseOver="View('660066');" onClick="Set('660066');"></td>
+<td class="color" bgcolor="#663366" onMouseOver="View('663366');" onClick="Set('663366');"></td>
+<td class="color" bgcolor="#666666" onMouseOver="View('666666');" onClick="Set('666666');"></td>
+<td class="color" bgcolor="#669966" onMouseOver="View('669966');" onClick="Set('669966');"></td>
+<td class="color" bgcolor="#66CC66" onMouseOver="View('66CC66');" onClick="Set('66CC66');"></td>
+<td class="color" bgcolor="#66FF66" onMouseOver="View('66FF66');" onClick="Set('66FF66');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#999999" onMouseOver="View('999999');" onClick="Set('999999');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#000099" onMouseOver="View('000099');" onClick="Set('000099');"></td>
+<td class="color" bgcolor="#003399" onMouseOver="View('003399');" onClick="Set('003399');"></td>
+<td class="color" bgcolor="#006699" onMouseOver="View('006699');" onClick="Set('006699');"></td>
+<td class="color" bgcolor="#009999" onMouseOver="View('009999');" onClick="Set('009999');"></td>
+<td class="color" bgcolor="#00CC99" onMouseOver="View('00CC99');" onClick="Set('00CC99');"></td>
+<td class="color" bgcolor="#00FF99" onMouseOver="View('00FF99');" onClick="Set('00FF99');"></td>
+<td class="color" bgcolor="#330099" onMouseOver="View('330099');" onClick="Set('330099');"></td>
+<td class="color" bgcolor="#333399" onMouseOver="View('333399');" onClick="Set('333399');"></td>
+<td class="color" bgcolor="#336699" onMouseOver="View('336699');" onClick="Set('336699');"></td>
+<td class="color" bgcolor="#339999" onMouseOver="View('339999');" onClick="Set('339999');"></td>
+<td class="color" bgcolor="#33CC99" onMouseOver="View('33CC99');" onClick="Set('33CC99');"></td>
+<td class="color" bgcolor="#33FF99" onMouseOver="View('33FF99');" onClick="Set('33FF99');"></td>
+<td class="color" bgcolor="#660099" onMouseOver="View('660099');" onClick="Set('660099');"></td>
+<td class="color" bgcolor="#663399" onMouseOver="View('663399');" onClick="Set('663399');"></td>
+<td class="color" bgcolor="#666699" onMouseOver="View('666699');" onClick="Set('666699');"></td>
+<td class="color" bgcolor="#669999" onMouseOver="View('669999');" onClick="Set('669999');"></td>
+<td class="color" bgcolor="#66CC99" onMouseOver="View('66CC99');" onClick="Set('66CC99');"></td>
+<td class="color" bgcolor="#66FF99" onMouseOver="View('66FF99');" onClick="Set('66FF99');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#CCCCCC" onMouseOver="View('CCCCCC');" onClick="Set('CCCCCC');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#0000CC" onMouseOver="View('0000CC');" onClick="Set('0000CC');"></td>
+<td class="color" bgcolor="#0033CC" onMouseOver="View('0033CC');" onClick="Set('0033CC');"></td>
+<td class="color" bgcolor="#0066CC" onMouseOver="View('0066CC');" onClick="Set('0066CC');"></td>
+<td class="color" bgcolor="#0099CC" onMouseOver="View('0099CC');" onClick="Set('0099CC');"></td>
+<td class="color" bgcolor="#00CCCC" onMouseOver="View('00CCCC');" onClick="Set('00CCCC');"></td>
+<td class="color" bgcolor="#00FFCC" onMouseOver="View('00FFCC');" onClick="Set('00FFCC');"></td>
+<td class="color" bgcolor="#3300CC" onMouseOver="View('3300CC');" onClick="Set('3300CC');"></td>
+<td class="color" bgcolor="#3333CC" onMouseOver="View('3333CC');" onClick="Set('3333CC');"></td>
+<td class="color" bgcolor="#3366CC" onMouseOver="View('3366CC');" onClick="Set('3366CC');"></td>
+<td class="color" bgcolor="#3399CC" onMouseOver="View('3399CC');" onClick="Set('3399CC');"></td>
+<td class="color" bgcolor="#33CCCC" onMouseOver="View('33CCCC');" onClick="Set('33CCCC');"></td>
+<td class="color" bgcolor="#33FFCC" onMouseOver="View('33FFCC');" onClick="Set('33FFCC');"></td>
+<td class="color" bgcolor="#6600CC" onMouseOver="View('6600CC');" onClick="Set('6600CC');"></td>
+<td class="color" bgcolor="#6633CC" onMouseOver="View('6633CC');" onClick="Set('6633CC');"></td>
+<td class="color" bgcolor="#6666CC" onMouseOver="View('6666CC');" onClick="Set('6666CC');"></td>
+<td class="color" bgcolor="#6699CC" onMouseOver="View('6699CC');" onClick="Set('6699CC');"></td>
+<td class="color" bgcolor="#66CCCC" onMouseOver="View('66CCCC');" onClick="Set('66CCCC');"></td>
+<td class="color" bgcolor="#66FFCC" onMouseOver="View('66FFCC');" onClick="Set('66FFCC');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#FFFFFF" onMouseOver="View('FFFFFF');" onClick="Set('FFFFFF');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#0000FF" onMouseOver="View('0000FF');" onClick="Set('0000FF');"></td>
+<td class="color" bgcolor="#0033FF" onMouseOver="View('0033FF');" onClick="Set('0033FF');"></td>
+<td class="color" bgcolor="#0066FF" onMouseOver="View('0066FF');" onClick="Set('0066FF');"></td>
+<td class="color" bgcolor="#0099FF" onMouseOver="View('0099FF');" onClick="Set('0099FF');"></td>
+<td class="color" bgcolor="#00CCFF" onMouseOver="View('00CCFF');" onClick="Set('00CCFF');"></td>
+<td class="color" bgcolor="#00FFFF" onMouseOver="View('00FFFF');" onClick="Set('00FFFF');"></td>
+<td class="color" bgcolor="#3300FF" onMouseOver="View('3300FF');" onClick="Set('3300FF');"></td>
+<td class="color" bgcolor="#3333FF" onMouseOver="View('3333FF');" onClick="Set('3333FF');"></td>
+<td class="color" bgcolor="#3366FF" onMouseOver="View('3366FF');" onClick="Set('3366FF');"></td>
+<td class="color" bgcolor="#3399FF" onMouseOver="View('3399FF');" onClick="Set('3399FF');"></td>
+<td class="color" bgcolor="#33CCFF" onMouseOver="View('33CCFF');" onClick="Set('33CCFF');"></td>
+<td class="color" bgcolor="#33FFFF" onMouseOver="View('33FFFF');" onClick="Set('33FFFF');"></td>
+<td class="color" bgcolor="#6600FF" onMouseOver="View('6600FF');" onClick="Set('6600FF');"></td>
+<td class="color" bgcolor="#6633FF" onMouseOver="View('6633FF');" onClick="Set('6633FF');"></td>
+<td class="color" bgcolor="#6666FF" onMouseOver="View('6666FF');" onClick="Set('6666FF');"></td>
+<td class="color" bgcolor="#6699FF" onMouseOver="View('6699FF');" onClick="Set('6699FF');"></td>
+<td class="color" bgcolor="#66CCFF" onMouseOver="View('66CCFF');" onClick="Set('66CCFF');"></td>
+<td class="color" bgcolor="#66FFFF" onMouseOver="View('66FFFF');" onClick="Set('66FFFF');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#FF0000" onMouseOver="View('FF0000');" onClick="Set('FF0000');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#990000" onMouseOver="View('990000');" onClick="Set('990000');"></td>
+<td class="color" bgcolor="#993300" onMouseOver="View('993300');" onClick="Set('993300');"></td>
+<td class="color" bgcolor="#996600" onMouseOver="View('996600');" onClick="Set('996600');"></td>
+<td class="color" bgcolor="#999900" onMouseOver="View('999900');" onClick="Set('999900');"></td>
+<td class="color" bgcolor="#99CC00" onMouseOver="View('99CC00');" onClick="Set('99CC00');"></td>
+<td class="color" bgcolor="#99FF00" onMouseOver="View('99FF00');" onClick="Set('99FF00');"></td>
+<td class="color" bgcolor="#CC0000" onMouseOver="View('CC0000');" onClick="Set('CC0000');"></td>
+<td class="color" bgcolor="#CC3300" onMouseOver="View('CC3300');" onClick="Set('CC3300');"></td>
+<td class="color" bgcolor="#CC6600" onMouseOver="View('CC6600');" onClick="Set('CC6600');"></td>
+<td class="color" bgcolor="#CC9900" onMouseOver="View('CC9900');" onClick="Set('CC9900');"></td>
+<td class="color" bgcolor="#CCCC00" onMouseOver="View('CCCC00');" onClick="Set('CCCC00');"></td>
+<td class="color" bgcolor="#CCFF00" onMouseOver="View('CCFF00');" onClick="Set('CCFF00');"></td>
+<td class="color" bgcolor="#FF0000" onMouseOver="View('FF0000');" onClick="Set('FF0000');"></td>
+<td class="color" bgcolor="#FF3300" onMouseOver="View('FF3300');" onClick="Set('FF3300');"></td>
+<td class="color" bgcolor="#FF6600" onMouseOver="View('FF6600');" onClick="Set('FF6600');"></td>
+<td class="color" bgcolor="#FF9900" onMouseOver="View('FF9900');" onClick="Set('FF9900');"></td>
+<td class="color" bgcolor="#FFCC00" onMouseOver="View('FFCC00');" onClick="Set('FFCC00');"></td>
+<td class="color" bgcolor="#FFFF00" onMouseOver="View('FFFF00');" onClick="Set('FFFF00');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#00FF00" onMouseOver="View('00FF00');" onClick="Set('00FF00');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#990033" onMouseOver="View('990033');" onClick="Set('990033');"></td>
+<td class="color" bgcolor="#993333" onMouseOver="View('993333');" onClick="Set('993333');"></td>
+<td class="color" bgcolor="#996633" onMouseOver="View('996633');" onClick="Set('996633');"></td>
+<td class="color" bgcolor="#999933" onMouseOver="View('999933');" onClick="Set('999933');"></td>
+<td class="color" bgcolor="#99CC33" onMouseOver="View('99CC33');" onClick="Set('99CC33');"></td>
+<td class="color" bgcolor="#99FF33" onMouseOver="View('99FF33');" onClick="Set('99FF33');"></td>
+<td class="color" bgcolor="#CC0033" onMouseOver="View('CC0033');" onClick="Set('CC0033');"></td>
+<td class="color" bgcolor="#CC3333" onMouseOver="View('CC3333');" onClick="Set('CC3333');"></td>
+<td class="color" bgcolor="#CC6633" onMouseOver="View('CC6633');" onClick="Set('CC6633');"></td>
+<td class="color" bgcolor="#CC9933" onMouseOver="View('CC9933');" onClick="Set('CC9933');"></td>
+<td class="color" bgcolor="#CCCC33" onMouseOver="View('CCCC33');" onClick="Set('CCCC33');"></td>
+<td class="color" bgcolor="#CCFF33" onMouseOver="View('CCFF33');" onClick="Set('CCFF33');"></td>
+<td class="color" bgcolor="#FF0033" onMouseOver="View('FF0033');" onClick="Set('FF0033');"></td>
+<td class="color" bgcolor="#FF3333" onMouseOver="View('FF3333');" onClick="Set('FF3333');"></td>
+<td class="color" bgcolor="#FF6633" onMouseOver="View('FF6633');" onClick="Set('FF6633');"></td>
+<td class="color" bgcolor="#FF9933" onMouseOver="View('FF9933');" onClick="Set('FF9933');"></td>
+<td class="color" bgcolor="#FFCC33" onMouseOver="View('FFCC33');" onClick="Set('FFCC33');"></td>
+<td class="color" bgcolor="#FFFF33" onMouseOver="View('FFFF33');" onClick="Set('FFFF33');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#0000FF" onMouseOver="View('0000FF');" onClick="Set('0000FF');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#990066" onMouseOver="View('990066');" onClick="Set('990066');"></td>
+<td class="color" bgcolor="#993366" onMouseOver="View('993366');" onClick="Set('993366');"></td>
+<td class="color" bgcolor="#996666" onMouseOver="View('996666');" onClick="Set('996666');"></td>
+<td class="color" bgcolor="#999966" onMouseOver="View('999966');" onClick="Set('999966');"></td>
+<td class="color" bgcolor="#99CC66" onMouseOver="View('99CC66');" onClick="Set('99CC66');"></td>
+<td class="color" bgcolor="#99FF66" onMouseOver="View('99FF66');" onClick="Set('99FF66');"></td>
+<td class="color" bgcolor="#CC0066" onMouseOver="View('CC0066');" onClick="Set('CC0066');"></td>
+<td class="color" bgcolor="#CC3366" onMouseOver="View('CC3366');" onClick="Set('CC3366');"></td>
+<td class="color" bgcolor="#CC6666" onMouseOver="View('CC6666');" onClick="Set('CC6666');"></td>
+<td class="color" bgcolor="#CC9966" onMouseOver="View('CC9966');" onClick="Set('CC9966');"></td>
+<td class="color" bgcolor="#CCCC66" onMouseOver="View('CCCC66');" onClick="Set('CCCC66');"></td>
+<td class="color" bgcolor="#CCFF66" onMouseOver="View('CCFF66');" onClick="Set('CCFF66');"></td>
+<td class="color" bgcolor="#FF0066" onMouseOver="View('FF0066');" onClick="Set('FF0066');"></td>
+<td class="color" bgcolor="#FF3366" onMouseOver="View('FF3366');" onClick="Set('FF3366');"></td>
+<td class="color" bgcolor="#FF6666" onMouseOver="View('FF6666');" onClick="Set('FF6666');"></td>
+<td class="color" bgcolor="#FF9966" onMouseOver="View('FF9966');" onClick="Set('FF9966');"></td>
+<td class="color" bgcolor="#FFCC66" onMouseOver="View('FFCC66');" onClick="Set('FFCC66');"></td>
+<td class="color" bgcolor="#FFFF66" onMouseOver="View('FFFF66');" onClick="Set('FFFF66');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#FFFF00" onMouseOver="View('FFFF00');" onClick="Set('FFFF00');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#990099" onMouseOver="View('990099');" onClick="Set('990099');"></td>
+<td class="color" bgcolor="#993399" onMouseOver="View('993399');" onClick="Set('993399');"></td>
+<td class="color" bgcolor="#996699" onMouseOver="View('996699');" onClick="Set('996699');"></td>
+<td class="color" bgcolor="#999999" onMouseOver="View('999999');" onClick="Set('999999');"></td>
+<td class="color" bgcolor="#99CC99" onMouseOver="View('99CC99');" onClick="Set('99CC99');"></td>
+<td class="color" bgcolor="#99FF99" onMouseOver="View('99FF99');" onClick="Set('99FF99');"></td>
+<td class="color" bgcolor="#CC0099" onMouseOver="View('CC0099');" onClick="Set('CC0099');"></td>
+<td class="color" bgcolor="#CC3399" onMouseOver="View('CC3399');" onClick="Set('CC3399');"></td>
+<td class="color" bgcolor="#CC6699" onMouseOver="View('CC6699');" onClick="Set('CC6699');"></td>
+<td class="color" bgcolor="#CC9999" onMouseOver="View('CC9999');" onClick="Set('CC9999');"></td>
+<td class="color" bgcolor="#CCCC99" onMouseOver="View('CCCC99');" onClick="Set('CCCC99');"></td>
+<td class="color" bgcolor="#CCFF99" onMouseOver="View('CCFF99');" onClick="Set('CCFF99');"></td>
+<td class="color" bgcolor="#FF0099" onMouseOver="View('FF0099');" onClick="Set('FF0099');"></td>
+<td class="color" bgcolor="#FF3399" onMouseOver="View('FF3399');" onClick="Set('FF3399');"></td>
+<td class="color" bgcolor="#FF6699" onMouseOver="View('FF6699');" onClick="Set('FF6699');"></td>
+<td class="color" bgcolor="#FF9999" onMouseOver="View('FF9999');" onClick="Set('FF9999');"></td>
+<td class="color" bgcolor="#FFCC99" onMouseOver="View('FFCC99');" onClick="Set('FFCC99');"></td>
+<td class="color" bgcolor="#FFFF99" onMouseOver="View('FFFF99');" onClick="Set('FFFF99');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#00FFFF" onMouseOver="View('00FFFF');" onClick="Set('00FFFF');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#9900CC" onMouseOver="View('9900CC');" onClick="Set('9900CC');"></td>
+<td class="color" bgcolor="#9933CC" onMouseOver="View('9933CC');" onClick="Set('9933CC');"></td>
+<td class="color" bgcolor="#9966CC" onMouseOver="View('9966CC');" onClick="Set('9966CC');"></td>
+<td class="color" bgcolor="#9999CC" onMouseOver="View('9999CC');" onClick="Set('9999CC');"></td>
+<td class="color" bgcolor="#99CCCC" onMouseOver="View('99CCCC');" onClick="Set('99CCCC');"></td>
+<td class="color" bgcolor="#99FFCC" onMouseOver="View('99FFCC');" onClick="Set('99FFCC');"></td>
+<td class="color" bgcolor="#CC00CC" onMouseOver="View('CC00CC');" onClick="Set('CC00CC');"></td>
+<td class="color" bgcolor="#CC33CC" onMouseOver="View('CC33CC');" onClick="Set('CC33CC');"></td>
+<td class="color" bgcolor="#CC66CC" onMouseOver="View('CC66CC');" onClick="Set('CC66CC');"></td>
+<td class="color" bgcolor="#CC99CC" onMouseOver="View('CC99CC');" onClick="Set('CC99CC');"></td>
+<td class="color" bgcolor="#CCCCCC" onMouseOver="View('CCCCCC');" onClick="Set('CCCCCC');"></td>
+<td class="color" bgcolor="#CCFFCC" onMouseOver="View('CCFFCC');" onClick="Set('CCFFCC');"></td>
+<td class="color" bgcolor="#FF00CC" onMouseOver="View('FF00CC');" onClick="Set('FF00CC');"></td>
+<td class="color" bgcolor="#FF33CC" onMouseOver="View('FF33CC');" onClick="Set('FF33CC');"></td>
+<td class="color" bgcolor="#FF66CC" onMouseOver="View('FF66CC');" onClick="Set('FF66CC');"></td>
+<td class="color" bgcolor="#FF99CC" onMouseOver="View('FF99CC');" onClick="Set('FF99CC');"></td>
+<td class="color" bgcolor="#FFCCCC" onMouseOver="View('FFCCCC');" onClick="Set('FFCCCC');"></td>
+<td class="color" bgcolor="#FFFFCC" onMouseOver="View('FFFFCC');" onClick="Set('FFFFCC');"></td>
+</tr>
+<tr>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#FF00FF" onMouseOver="View('FF00FF');" onClick="Set('FF00FF');"></td>
+<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
+<td class="color" bgcolor="#9900FF" onMouseOver="View('9900FF');" onClick="Set('9900FF');"></td>
+<td class="color" bgcolor="#9933FF" onMouseOver="View('9933FF');" onClick="Set('9933FF');"></td>
+<td class="color" bgcolor="#9966FF" onMouseOver="View('9966FF');" onClick="Set('9966FF');"></td>
+<td class="color" bgcolor="#9999FF" onMouseOver="View('9999FF');" onClick="Set('9999FF');"></td>
+<td class="color" bgcolor="#99CCFF" onMouseOver="View('99CCFF');" onClick="Set('99CCFF');"></td>
+<td class="color" bgcolor="#99FFFF" onMouseOver="View('99FFFF');" onClick="Set('99FFFF');"></td>
+<td class="color" bgcolor="#CC00FF" onMouseOver="View('CC00FF');" onClick="Set('CC00FF');"></td>
+<td class="color" bgcolor="#CC33FF" onMouseOver="View('CC33FF');" onClick="Set('CC33FF');"></td>
+<td class="color" bgcolor="#CC66FF" onMouseOver="View('CC66FF');" onClick="Set('CC66FF');"></td>
+<td class="color" bgcolor="#CC99FF" onMouseOver="View('CC99FF');" onClick="Set('CC99FF');"></td>
+<td class="color" bgcolor="#CCCCFF" onMouseOver="View('CCCCFF');" onClick="Set('CCCCFF');"></td>
+<td class="color" bgcolor="#CCFFFF" onMouseOver="View('CCFFFF');" onClick="Set('CCFFFF');"></td>
+<td class="color" bgcolor="#FF00FF" onMouseOver="View('FF00FF');" onClick="Set('FF00FF');"></td>
+<td class="color" bgcolor="#FF33FF" onMouseOver="View('FF33FF');" onClick="Set('FF33FF');"></td>
+<td class="color" bgcolor="#FF66FF" onMouseOver="View('FF66FF');" onClick="Set('FF66FF');"></td>
+<td class="color" bgcolor="#FF99FF" onMouseOver="View('FF99FF');" onClick="Set('FF99FF');"></td>
+<td class="color" bgcolor="#FFCCFF" onMouseOver="View('FFCCFF');" onClick="Set('FFCCFF');"></td>
+<td class="color" bgcolor="#FFFFFF" onMouseOver="View('FFFFFF');" onClick="Set('FFFFFF');"></td>
+</tr>
+</table>
+</div>
+</body>
+</html>
+
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultFont/default-font.js b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultFont/default-font.js
new file mode 100644 (file)
index 0000000..a6ab288
--- /dev/null
@@ -0,0 +1,167 @@
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/*
+ * Default Font Plugin for TYPO3 htmlArea RTE
+ *
+ * TYPO3 SVN ID: $Id: default-font.js  $
+ */
+DefaultFont = HTMLArea.Plugin.extend({
+               
+       constructor : function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin : function (editor) {
+               
+               this.options = new Object();
+               this.options.FontName= this.editorConfiguration.buttons.fontstyle.options;
+               this.options.FontSize= this.editorConfiguration.buttons.fontsize.options;
+               this.disablePCexamples = this.editorConfiguration.disablePCexamples
+               
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : "1.0",
+                       developer       : "Stanislas Rolland",
+                       developerUrl    : "http://www.fructifor.ca/",
+                       copyrightOwner  : "Stanislas Rolland",
+                       sponsor         : "Fructifor Inc.",
+                       sponsorUrl      : "http://www.fructifor.ca/",
+                       license         : "GPL"
+               };
+               this.registerPluginInformation(pluginInformation);
+               
+               /*
+                * Registering the dropdowns
+                */
+               for (var i = 0, n = this.dropDownList.length; i < n; ++i) {
+                       var dropDown = this.dropDownList[i];
+                       buttonId = dropDown[0];
+                       var dropDownConfiguration = {
+                               id              : buttonId,
+                               tooltip         : this.localize(buttonId.toLowerCase()),
+                               options         : this.options[buttonId],
+                               action          : "onChange",
+                               context         : null
+                       };
+                       this.registerDropDown(dropDownConfiguration);
+               }
+               return true;
+        },
+        
+       /*
+        * The list of buttons added by this plugin
+        */
+       dropDownList : [
+               ["FontName", null],
+               ["FontSize", null]
+       ],
+        
+       /*
+        * This function gets called when some font style or font size was selected from the dropdown lists
+        */
+       onChange : function (editor, buttonId) {
+               var select = document.getElementById(this.editor._toolbarObjects[buttonId].elementId);
+               var param = select.value;
+               editor.focusEditor();
+               
+               if (param) {
+                       this.editor._doc.execCommand(buttonId, false, param);
+               } else {
+                       var selection = this.editor._getSelection();
+                               // Find font node and select it
+                       if (HTMLArea.is_gecko && selection.isCollapsed) {
+                               var fontNode = this.editor._getFirstAncestor(selection, "font");
+                               if (fontNode != null) {
+                                       this.editor.selectNode(fontNode);
+                               }
+                       }
+                               // Remove format
+                       this.editor._doc.execCommand("RemoveFormat", false, null);
+                               // Collapse range if font was found
+                       if (HTMLArea.is_gecko && fontNode != null) {
+                               selection = this.editor._getSelection();
+                               var range = this.editor._createRange(selection).cloneRange();
+                               range.collapse(false);
+                               this.editor.emptySelection(selection);
+                               this.editor.addRangeToSelection(selection, range);
+                       }
+               }
+               return false;
+       },
+       
+       /*
+        * This function gets called when the toolbar is updated
+        */
+       onUpdateToolbar : function () {
+               var editor = this.editor;
+               var buttonId, k;
+               if (editor.getMode() === "wysiwyg" && this.editor.isEditable()) {
+                       for (var i = 0, n = this.dropDownList.length; i < n; ++i) {
+                               buttonId = this.dropDownList[i][0];
+                               if (this.isButtonInToolbar(buttonId)) {
+                                       var select = document.getElementById(editor._toolbarObjects[buttonId].elementId);
+                                       select.selectedIndex = 0;
+                                       var value = ("" + editor._doc.queryCommandValue(buttonId)).trim().toLowerCase().replace(/\'/g, "");
+                                       if (value) {
+                                               var options = this.options[buttonId];
+                                               k = 0;
+                                               for (var j in options) {
+                                                       if (options.hasOwnProperty(j)) {
+                                                               if ((j.toLowerCase().indexOf(value) !== -1)
+                                                                               || (options[j].trim().substr(0, value.length).toLowerCase() == value)
+                                                                               || ((buttonId === "FontName") && (options[j].toLowerCase().indexOf(value) !== -1))) {
+                                                                       select.selectedIndex = k;
+                                                                       break;
+                                                               }
+                                                               ++k;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+       },
+       
+       /*
+        * This function gets called when the plugin is generated
+        */
+       onGenerate : function () {
+               if (!this.disablePCexamples) {
+                       var select = document.getElementById(this.editor._toolbarObjects.FontName.elementId);
+                       for (var i = select.options.length; --i >= 0;) {
+                               if (HTMLArea.is_gecko) select.options[i].setAttribute("style", "font-family:" + select.options[i].value + ";");
+                                       else select.options[i].style.cssText = "font-family:" + select.options[i].value + ";";
+                       }
+               }
+       }
+});
+
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultFont/locallang.xml b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultFont/locallang.xml
new file mode 100644 (file)
index 0000000..d5c671d
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- TYPO3 SVN ID: $Id: locallang.xml 2668 2007-11-07 02:59:19Z stanrolland $ -->
+<T3locallang>
+       <meta type="array">
+               <description>Labels for Default Font plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
index 99774fd..e867441 100644 (file)
@@ -79,6 +79,7 @@ DefaultImage = HTMLArea.Plugin.extend({
                        id              : buttonId,
                        tooltip         : this.localize("insertimage"),
                        action          : "onButtonPress",
+                       hotKey          : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null),
                        dialog          : true
                };
                this.registerButton(buttonConfiguration);
index 24ccb73..fe4c74c 100644 (file)
@@ -100,18 +100,18 @@ DefaultInline = HTMLArea.Plugin.extend({
                var editor = this.editor;
                var buttonList = DefaultInline.buttonList;
                var buttonId, n = buttonList.length, commandState;
-               for (var i = 0; i < n; ++i) {
-                       buttonId = buttonList[i][0];
-                       if (this.isButtonInToolbar(buttonId)) {
-                               commandState = false;
-                               if ((editor._editMode != "textmode")) {
+               if (editor.getMode() === "wysiwyg" && editor.isEditable()) {
+                       for (var i = 0; i < n; ++i) {
+                               buttonId = buttonList[i][0];
+                               if (this.isButtonInToolbar(buttonId)) {
+                                       commandState = false;
                                        try {
                                                commandState = editor._doc.queryCommandState(buttonId);
                                        } catch(e) {
                                                commandState = false;
                                        }
+                                       editor._toolbarObjects[buttonId].state("active", commandState);
                                }
-                               editor._toolbarObjects[buttonId].state("active", commandState);
                        }
                }
        }
index c3c9cd8..ed688b3 100644 (file)
@@ -14,9 +14,6 @@
                        <label index="Superscript-Tooltip">Superscript</label>
                        <label index="Underline-Tooltip">Underline</label>
                </languageKey>
-               <languageKey index="fr" type="array">
-                       <label index="Bold-Tooltip">Gras</label>
-               </languageKey>
        </data>
        <orig_hash type="array">
                <languageKey index="default" type="array">
index a5c74f9..2113689 100644 (file)
@@ -69,6 +69,7 @@ DefaultLink = HTMLArea.Plugin.extend({
                        id              : buttonId,
                        tooltip         : this.localize("createlink"),
                        action          : "onButtonPress",
+                       hotKey          : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null),
                        context         : "a",
                        selection       : true,
                        dialog          : true
index 8f2d852..2f640f2 100644 (file)
@@ -130,7 +130,7 @@ DynamicCSS = HTMLArea.Plugin.extend({
        onUpdateToolbar : function() {
                var editor = this.editor;
                var obj = editor.config.customSelects["DynamicCSS-class"];
-               if (HTMLArea.is_gecko && editor._editMode != "textmode") {
+               if (HTMLArea.is_gecko && editor.getMode() === "wysiwyg" && editor.isEditable()) {
                        if(obj.loaded) { 
                                this.updateValue(editor,obj);
                        } else {
@@ -140,7 +140,7 @@ DynamicCSS = HTMLArea.Plugin.extend({
                                }
                                this.generate(editor);
                        }
-               } else if (editor._editMode == "textmode") {
+               } else if (editor.getMode() === "textmode") {
                        var select = document.getElementById(editor._toolbarObjects[obj.id].elementId);
                        select.disabled = true;
                        select.className = "buttonDisabled";
@@ -175,7 +175,7 @@ DynamicCSS = HTMLArea.Plugin.extend({
        
        onMode : function(mode) {
                var editor = this.editor;
-               if (mode == 'wysiwyg'){
+               if (mode == 'wysiwyg' && editor.isEditable()) {
                        var obj = editor.config.customSelects["DynamicCSS-class"];
                        if (obj.loaded) { 
                                this.updateValue(editor,obj);
index 2aa366e..d96fdab 100644 (file)
@@ -150,7 +150,7 @@ InlineCSS = HTMLArea.Plugin.extend({
        onUpdateToolbar : function() {
                var editor = this.editor;
                var obj = editor.config.customSelects["InlineCSS-class"];
-               if (HTMLArea.is_gecko && editor._editMode != "textmode") {
+               if (HTMLArea.is_gecko && editor.getMode() === "wysiwyg" && editor.isEditable()) {
                        if (obj.loaded) { 
                                this.updateValue(editor,obj);
                        } else {
@@ -197,7 +197,7 @@ InlineCSS = HTMLArea.Plugin.extend({
        
        onMode : function(mode) {
                var editor = this.editor;
-               if (mode=='wysiwyg'){
+               if (mode === "wysiwyg" && editor.isEditable()) {
                        var obj = editor.config.customSelects["InlineCSS-class"];
                        if (obj.loaded) { 
                                this.updateValue(editor,obj);
index 8d4965a..99ef7aa 100644 (file)
@@ -424,7 +424,7 @@ InlineElements = HTMLArea.Plugin.extend({
        */
        onUpdateToolbar : function () {
                var editor = this.editor;
-               if (editor._editMode !== "textmode") {
+               if (editor.getMode() === "wysiwyg" && editor.isEditable()) {
                        var id, activeButton;
                        var tagName = false, endPointsInSameBlock = true, fullNodeSelected = false;
                        var sel = editor._getSelection();
index 09af727..b45bab2 100644 (file)
@@ -44,6 +44,8 @@ InsertSmiley = HTMLArea.Plugin.extend({
         */
        configurePlugin : function(editor) {
                
+               this.pageTSConfiguration = this.editorConfiguration.buttons.emoticon;
+               
                /*
                 * Registering plugin "About" information
                 */
@@ -66,6 +68,7 @@ InsertSmiley = HTMLArea.Plugin.extend({
                        id              : buttonId,
                        tooltip         : this.localize("Insert Smiley"),
                        action          : "onButtonPress",
+                       hotKey          : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null),
                        dialog          : true
                };
                this.registerButton(buttonConfiguration);
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js b/typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js
new file mode 100644 (file)
index 0000000..338b939
--- /dev/null
@@ -0,0 +1,128 @@
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/*
+ * Language Plugin for TYPO3 htmlArea RTE
+ *
+ * TYPO3 SVN ID: $Id: language.js 2862 2008-01-05 19:32:58Z stanrolland $
+ */
+Language = HTMLArea.Plugin.extend({
+               
+       constructor : function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin : function (editor) {
+               
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : "1.0",
+                       developer       : "Stanislas Rolland",
+                       developerUrl    : "http://www.fructifor.ca/",
+                       copyrightOwner  : "Stanislas Rolland",
+                       sponsor         : "Fructifor Inc.",
+                       sponsorUrl      : "http://www.fructifor.ca/",
+                       license         : "GPL"
+               };
+               this.registerPluginInformation(pluginInformation);
+               
+               /*
+                * Registering the buttons
+                */
+               var buttonList = this.buttonList;
+               for (var i = 0, n = buttonList.length; i < n; ++i) {
+                       var button = buttonList[i];
+                       buttonId = button[0];
+                       var buttonConfiguration = {
+                               id              : buttonId,
+                               tooltip         : this.localize(buttonId + "-Tooltip"),
+                               action          : "onButtonPress",
+                               context         : button[1]
+                       };
+                       this.registerButton(buttonConfiguration);
+               }
+               
+               return true;
+        },
+        
+       /* The list of buttons added by this plugin */
+       buttonList : [
+               ["LeftToRight", null],
+               ["RightToLeft", null]
+       ],
+        
+       /*
+        * This function gets called when a button was pressed.
+        *
+        * @param       object          editor: the editor instance
+        * @param       string          id: the button id or the key
+        *
+        * @return      boolean         false if action is completed
+        */
+       onButtonPress : function (editor, id, target) {
+                       // Could be a button or its hotkey
+               var buttonId = this.translateHotKey(id);
+               buttonId = buttonId ? buttonId : id;
+               
+               var direction = (buttonId == "RightToLeft") ? "rtl" : "ltr";
+               var el = this.editor.getParentElement();
+               while (el && !HTMLArea.isBlockElement(el)) {
+                       el = el.parentNode;
+               }
+               if (el) {
+                       el.style.direction = (el.style.direction == direction) ? "" : direction;
+               }
+               
+               return false;
+       },
+       
+       /*
+        * This function gets called when the toolbar is updated
+        */
+       onUpdateToolbar : function () {
+               if (this.editor.getMode() === "wysiwyg" && this.editor.isEditable()) {
+                       var buttonList = this.buttonList, buttonId;
+                       for (var i = 0, n = buttonList.length; i < n; ++i) {
+                               buttonId = buttonList[i][0];
+                               if (this.isButtonInToolbar(buttonId)) {
+                                       var el = this.editor.getParentElement();
+                                       while (el && !HTMLArea.isBlockElement(el)) {
+                                               el = el.parentNode;
+                                       }
+                                       if (el) {
+                                               this.editor._toolbarObjects[buttonId].state("active",(el.style.direction == ((buttonId == "RightToLeft") ? "rtl" : "ltr")));
+                                       }
+                               }
+                       }
+               }
+       }
+});
+
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/locallang.xml b/typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/locallang.xml
new file mode 100644 (file)
index 0000000..dd6b092
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- TYPO3 SVN ID: $Id: locallang.xml 2668 2007-11-07 02:59:19Z stanrolland $ -->
+<T3locallang>
+       <meta type="array">
+               <description>Labels for Language plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="LeftToRight-Tooltip">Direction left to right</label>
+                       <label index="RightToLeft-Tooltip">Direction right to left</label>
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
index bd8c19d..d7c2af3 100644 (file)
@@ -4,7 +4,7 @@
 *  Copyright notice
 *
 *  (c) 2004 Cau guanabara <caugb@ibest.com.br>
-*  (c) 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2005-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 /*
  * Quick Tag Editor Plugin for TYPO3 htmlArea RTE
  *
- * TYPO3 CVS ID: $Id$
+ * TYPO3 SVN ID: $Id$
  */
 -->
 <head>
        <title>Quick Tag Editor</title>
        <meta http-equiv="Content-Style-Type" content="text/css" />
        <script type="text/javascript" src="../tag-lib.js"></script>
-       <script type="text/javascript" src="../../../popups/popup.js"></script>
        <script type="text/javascript">
-               HTMLArea = window.opener.HTMLArea;
-               _editor_CSS = window.opener._editor_CSS;
-               __dlg_loadStyle(_editor_CSS);
-               var QuickTag = window.opener.QuickTag;
-               var i18n = QuickTag.I18N;
-               var curTag = 'none';
+               /*<![CDATA[*/
+               <!--
+               var dialog = window.opener.HTMLArea.Dialog.QuickTag;
+               var curTag = "none";
                var curTagOpt = false;
                var CSSEdit = false;
-               var editor = null;
                
-                       // simulation of Dialog._return - select_color.html needs it.
-               var Dialog = new Object();
-               Dialog._return = function (val) {
-                       if(val && val != null) {
-                               if(CSSEdit) {
-                                       val += '; ';
-                               } else {
-                                       val += '"';
-                               }
-                               document.getElementById('tagopen').focus();
-                               document.getElementById('tagopen').value += "#"+val;
-                               document.getElementById('bt_colors').style.display = 'none';
-                       }
-               };
-
-               var SelectColorDialog = new Object();
-               SelectColorDialog._return = function (val) {
-                       if(val && val != null) {
-                               if(CSSEdit) {
-                                       val += '; ';
-                               } else {
-                                       val += '"';
-                               }
-                               document.getElementById('tagopen').value += val;
-                               document.getElementById('bt_colors').style.display = 'none';
-                               document.getElementById('tagopen').focus();
-                       }
-               };
-
                function Init() {
-                       __dlg_translate(i18n);
-                       __dlg_init(true,true);
-                       var param = window.dialogArguments;
-                       editor = param['editor'];
-                       var selectext = param['selectedText']; // sem uso...
+                       dialog.initialize();
                        
                        createDropdown("tags");
-                       
                        var to = document.getElementById('tagopen');
-                       HTMLArea._addEvent(to, "keypress", function(ev) { if(typeof choice_dropdown != "undefined") choice_dropdown(HTMLArea.is_ie ? window.event : ev); });
+                       HTMLArea._addEvent(to, "keypress", function(ev) { if (typeof choice_dropdown != "undefined") choice_dropdown(HTMLArea.is_ie ? window.event : ev); });
                        
-                       document.getElementById('bt_colors').style.display = 'none';
-                       document.body.onkeypress = __dlg_key_press;
+                       document.getElementById('bt_colors').style.display = "none";
+                       document.body.onkeypress = onKeyPress;
                        to.focus();
                };
 
                function onCancel() {
-                       __dlg_close(null);
+                       dialog.close();
                        return false;
                };
 
                function onOK() {
                        var el = document.getElementById('tagopen');
                        if(!el.value) {
-                               alert(i18n["Enter the TAG you want to insert"]);
+                               alert(dialog.plugin.localize("Enter the TAG you want to insert"));
                                el.focus();
                                return false;
                        }
                        if(!quoteTest(el.value)) {
                                if(!quoteTest(el.value + '"')) {
-                                       alert(i18n["There are some unclosed quote"]);
+                                       alert(dialog.plugin.localize("There are some unclosed quote"));
                                        el.focus();
                                        el.select();
                                        return false;
                                param.tagclose = subtag.cl+param.tagclose;
                        }
 
-                       __dlg_close(param);
+                       dialog.performAction(param);
+                       dialog.close();
                        return false;
                };
 
-               function __dlg_key_press(ev) {
+               function onKeyPress(ev) {
                        if(!ev) var ev = window.event;
                        switch(ev.keyCode) {
                                case 13: 
                                        document.getElementById('bt_ok').click();
                                        break;
                                case 27:
-                                       __dlg_close(null);
+                                       dialog.close();
                                        return false;
                        }
                        return true;
                        if (atrib) {
                                var atrer = eval('/'+atrib+'=/ig');
                                if(atrer.test(oldval) && !(/[^=]\"$/.test(toadd))) {
-                                       alert(i18n['This attribute already exists in the TAG']);
+                                       alert(dialog.plugin.localize("This attribute already exists in the TAG"));
                                        return false;
                                }
                                switch(atrib) {
                        }
                        
                        if(noCSSclasses) {
-                               document.getElementById('showselect').innerHTML = i18n['No CSS class avaiable'];
+                               document.getElementById('showselect').innerHTML = dialog.plugin.localize("No CSS class avaiable");
                                document.getElementById('showselect').style.visibility = 'visible';
                        }
                        
                                // If there is no '<HTML>' in the HTMLArea content, when using styleSheets[..].rule, IE generates an error.   
                                // In this case, we lost the classes in external CSS files.
                                // If FullPage is loaded, there is no problem.
-                       if(!(/<\s*html\s*>/i.test(editor.getHTML())) && document.all) {
-                               var styles = editor._doc.getElementsByTagName("style");
+                       if(!(/<\s*html\s*>/i.test(dialog.plugin.editor.getHTML())) && document.all) {
+                               var styles = dialog.plugin.editor._doc.getElementsByTagName("style");
                                for(var i in styles) {
                                        var cont = styles[i].innerHTML;
                                        if(typeof cont != 'undefined') {
                        }
 
                        var styleSheet = null;
-                       var styles = editor._doc.styleSheets;
+                       var styles = dialog.plugin.editor._doc.styleSheets;
                        for (var i = 0; i < styles.length; i++) {
                                styleSheet = styles[i];
                                if(document.all) {
                        
                        if (typeof(type) == 'object') {
                                var obj = type;
-                               forObj(i18n["OPTIONS"],'options');
+                               forObj(dialog.plugin.localize("OPTIONS"),'options');
                                _div.appendChild(_sel);
                                return;
                        }
                        
                        if (type == 'tags') {
                                var obj = new Object();
-                               if (editor.config.buttons["inserttag"] && editor.config.buttons["inserttag"]["denyTags"]) {
-                                       var denyTags = editor.config.buttons["inserttag"]["denyTags"].split(",").join("|").replace(/ /g, "");
+                               if (dialog.plugin.denyTags) {
+                                       var denyTags = dialog.plugin.denyTags.split(",").join("|").replace(/ /g, "");
                                        var expr = new RegExp("^("+denyTags+")$");
                                        for (var i in allTags) {
                                                if (!expr.test(i)) obj[i] = allTags[i];
                                } else {
                                        obj = allTags;
                                }
-                               forObj(i18n["TAGs"],'tags');
+                               forObj(dialog.plugin.localize("TAGs"),'tags');
                                _div.appendChild(_sel);
                                return;
                        }
                        if (typeof(topt) == 'object') {
                                var obj = new Object();
                                var allowedAttribs = "";
-                               if (typeof(tag) == 'string' && editor.config.buttons["inserttag"] && (editor.config.buttons["inserttag"]["allowedAttribs"] || (editor.config.buttons["inserttag"]["tags"] && editor.config.buttons["inserttag"]["tags"][tag] && editor.config.buttons["inserttag"]["tags"][tag]["allowedAttribs"]))) {
-                                       if (editor.config.buttons["inserttag"]["allowedAttribs"]) {
-                                               allowedAttribs = editor.config.buttons["inserttag"]["allowedAttribs"].split(",").join("|").replace(/ /g, "");
+                               if (typeof(tag) == "string" && (dialog.plugin.allowedAttribs || (dialog.plugin.tags && dialog.plugin.tags[tag] && dialog.plugin.tags[tag]["allowedAttribs"]))) {
+                                       if (dialog.plugin.allowedAttribs) {
+                                               allowedAttribs = dialog.plugin.allowedAttribs.split(",").join("|").replace(/ /g, "");
                                        }
-                                       if (editor.config.buttons["inserttag"]["tags"] && editor.config.buttons["inserttag"]["tags"][tag] && editor.config.buttons["inserttag"]["tags"][tag]["allowedAttribs"]) {
+                                       if (dialog.plugin.tags && dialog.plugin.tags[tag] && dialog.plugin.tags[tag]["allowedAttribs"]) {
                                                if (allowedAttribs) allowedAttribs =  allowedAttribs + "|";
-                                               allowedAttribs += editor.config.buttons["inserttag"]["tags"][tag]["allowedAttribs"].split(",").join("|").replace(/ /g, "");
+                                               allowedAttribs += dialog.plugin.tags[tag]["allowedAttribs"].split(",").join("|").replace(/ /g, "");
                                        }
                                        var expr = new RegExp("^("+allowedAttribs+")$");
                                        for (var i in topt) {
                        } else {
                                return;
                        }
-                       forObj(i18n["ATTRIBUTES"],'attributes');
+                       forObj(dialog.plugin.localize("ATTRIBUTES"),'attributes');
                        _div.appendChild(_sel);
 
                        function forObj(first,type) {
                                }
                        };
                };
-
+                       // Called from the TYPO3 Color plugin
+               var SelectColorDialog = new Object();
+               SelectColorDialog.insertColor = function (val) {
+                       insertColor(val);
+               };
+                       // Called from the Default Color plugin
+               function insertColor(val) {
+                       if(val && val != null) {
+                               if(CSSEdit) {
+                                       val += "; ";
+                               } else {
+                                       val += '" ';
+                               }
+                               document.getElementById('tagopen').value += val;
+                               document.getElementById('bt_colors').style.display = "none";
+                               document.getElementById('tagopen').focus();
+                               var att = 'all';
+                               if (curTagOpt == true) att = curTag;
+                               createDropdown(att, curTag);
+                       }
+               };
                function colors() {
-                       var selectColorPlugin = editor.plugins.SelectColor;
-                       if (selectColorPlugin) selectColorPlugin = selectColorPlugin.instance;
-                       if (selectColorPlugin) {
-                               selectColorPlugin.dialogSelectColor("tag", "", SelectColorDialog, window);
-                       } else { 
-                               var colloc = window.location.toString().replace(/plugins.+$/,"") + 
-                                       "popups/select_color.html";
-                               window.open(colloc, 'colors', "toolbar=no,location=no,directories=no," + 
-                                       "menubar=no,scrollbars=no,resizable=no,dependent=yes,width=200,height=182");
+                       var colorPlugin = dialog.plugin.editor.plugins.TYPO3Color;
+                       if (colorPlugin) {
+                               colorPlugin = colorPlugin.instance;
+                               colorPlugin.dialogSelectColor("tag", "", SelectColorDialog, window);
+                       } else {
+                               colorPlugin = dialog.plugin.editor.plugins.DefaultColor;
+                               if (colorPlugin) {
+                                       colorPlugin.instance.onButtonPress(dialog.plugin.editor, "QuickTag");
+                               }
                        }
                };
-</script>
+               // -->
+               /*]]>*/
+       </script>
 </head>
 <body class="popupwin" onload="Init();">
 <div class="title">Quick Tag Editor</div>
index b193160..19732ee 100644 (file)
@@ -2,7 +2,7 @@
 *  Copyright notice
 *
 *  (c) 2004 Cau guanabara <caugb@ibest.com.br>
-*  (c) 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2005-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
  *
  * TYPO3 CVS ID: $Id$
  */
-
-QuickTag = function(editor) {
-       this.editor = editor;
-       var cfg = editor.config;
-       var actionHandlerFunctRef = QuickTag.actionHandler(this);
-       cfg.registerButton({
-               id              : "InsertTag",
-               tooltip         : QuickTag_langArray["Quick Tag Editor"],
-               image           : editor.imgURL("ed_quicktag.gif", "QuickTag"),
-               textMode        : false,
-               action          : actionHandlerFunctRef,
-               context         : null,
-               hide            : false,
-               selection       : true
-               });
-};
-
-QuickTag.I18N = QuickTag_langArray;
-
-QuickTag.actionHandler = function(instance) {
-       return (function(editor) {
-               instance.buttonPress(editor);
-       });
-};
-
-QuickTag.prototype.buttonPress = function(editor) {
-       var sel = editor.getSelectedHTML().replace(/(<[^>]*>|&nbsp;|\n|\r)/g,""); 
-       var param = new Object();
-       param.editor = editor;
-
-       if(/\w/.test(sel)) {
-               var setTagHandlerFunctRef = QuickTag.setTagHandler(this);
-               editor._popupDialog("plugin://QuickTag/quicktag", setTagHandlerFunctRef, param, 450, 108);
-       } else {
-               alert(QuickTag.I18N['You have to select some text']);
-       }
-};
-
-QuickTag.setTagHandler = function(instance) {
-       return (function(param) {
+QuickTag = HTMLArea.Plugin.extend({
+               
+       constructor : function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin : function(editor) {
+               
+               this.pageTSConfiguration = this.editorConfiguration.buttons.inserttag;
+               this.tags = (this.pageTSConfiguration && this.pageTSConfiguration.tags) ? this.pageTSConfiguration.tags : null;
+               this.denyTags = (this.pageTSConfiguration && this.pageTSConfiguration.denyTags) ? this.pageTSConfiguration.denyTags : null;
+               this.allowedAttribs =  (this.pageTSConfiguration && this.pageTSConfiguration.allowedAttribs) ? this.pageTSConfiguration.allowedAttribs : null;
+               
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : "1.3",
+                       developer       : "Cau Guanabara & Stanislas Rolland",
+                       developerUrl    : "mailto:caugb@ibest.com.br",
+                       copyrightOwner  : "Cau Guanabara & Stanislas Rolland",
+                       sponsor         : "Independent production & Fructifor Inc.",
+                       sponsorUrl      : "http://www.netflash.com.br/gb/HA3-rc1/examples/quick-tag.html",
+                       license         : "GPL"
+               };
+               this.registerPluginInformation(pluginInformation);
+               
+               /*
+                * Registering the button
+                */
+               var buttonId = "InsertTag";
+               var buttonConfiguration = {
+                       id              : buttonId,
+                       tooltip         : this.localize("Quick Tag Editor"),
+                       action          : "onButtonPress",
+                       selection       : true,
+                       dialog          : true
+               };
+               this.registerButton(buttonConfiguration);
+               
+               return true;
+        },
+       
+       /*
+        * This function gets called when the button was pressed.
+        *
+        * @param       object          editor: the editor instance
+        * @param       string          id: the button id or the key
+        * @param       object          target: the target element of the contextmenu event, when invoked from the context menu
+        *
+        * @return      boolean         false if action is completed
+        */
+       onButtonPress : function(editor, id, target) {
+               var selection = editor.getSelectedHTML().replace(/(<[^>]*>|&nbsp;|\n|\r)/g,""); 
+               
+               if(/\w/.test(selection)) {
+                       this.dialog = this.openDialog("InsertTag", this.makeUrlFromPopupName("quicktag"), "setTag", null, {width:450, height:108});
+               } else {
+                       alert(this.localize("You have to select some text"));
+               }
+       },
+       
+       /*
+        * Insert the tag
+        *
+        * @param       object          param: the constructed tag
+        *
+        * @return      boolean         false
+        */
+       setTag : function(param) {
                if(param && typeof(param.tagopen) != "undefined") {
-                       instance.editor.focusEditor();
-                       instance.editor.surroundHTML(param.tagopen,param.tagclose);
+                       this.editor.focusEditor();
+                       this.editor.surroundHTML(param.tagopen, param.tagclose);
                }
-       });
-};
+       }
+});
 
-QuickTag._pluginInfo = {
-       name          : "QuickTag",
-       version       : "1.2",
-       developer     : "Cau Guanabara & Stanislas Rolland",
-       developer_url : "mailto:caugb@ibest.com.br",
-       c_owner       : "Cau Guanabara & Stanislas Rolland",
-       sponsor       : "Independent production & Fructifor Inc.",
-       sponsor_url   : "http://www.netflash.com.br/gb/HA3-rc1/examples/quick-tag.html",
-       license       : "GPL"
-};
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/locallang.xml b/typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/locallang.xml
new file mode 100644 (file)
index 0000000..e657dd6
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+       <meta type="array">
+               <description>Labels for TYPO3 Color plugin of htmlArea RTE</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="ForeColor">Text Color</label>
+                       <label index="HiliteColor">Background Color</label>
+                       <label index="ForeColor_title">Set the text color</label>
+                       <label index="HiliteColor_title">Set the background color</label>
+                       <label index="color_title">Choose a color</label>
+                       <label index="no_color">No color</label>
+               </languageKey>
+       </data>
+       <orig_hash type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_hash>
+       <orig_text type="array">
+               <languageKey index="default" type="array">
+               </languageKey>
+       </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js b/typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js
new file mode 100644 (file)
index 0000000..bcfe2f7
--- /dev/null
@@ -0,0 +1,370 @@
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2004-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/*
+ * TYPO3 Color Plugin for TYPO3 htmlArea RTE
+ *
+ * TYPO3 SVN ID: $Id: $
+ */
+TYPO3Color = HTMLArea.Plugin.extend({
+       
+       constructor : function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin : function(editor) {
+               
+               this.buttonsConfiguration = this.editorConfiguration.buttons;
+               this.colorsConfiguration = this.editorConfiguration.colors;
+               this.disableColorPicker = this.editorConfiguration.disableColorPicker;
+               
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : "1.7",
+                       developer       : "Stanislas Rolland",
+                       developerUrl    : "http://www.fructifor.ca/",
+                       copyrightOwner  : "Stanislas Rolland",
+                       sponsor         : "Fructifor Inc.",
+                       sponsorUrl      : "http://www.fructifor.ca/",
+                       license         : "GPL"
+               };
+               this.registerPluginInformation(pluginInformation);
+               
+               /*
+                * Registering the buttons
+                */
+               var buttonList = this.buttonList;
+               for (var i = 0; i < buttonList.length; ++i) {
+                       var button = buttonList[i];
+                       buttonId = button[0];
+                       var buttonConfiguration = {
+                               id              : buttonId,
+                               tooltip         : this.localize(buttonId),
+                               action          : "onButtonPress",
+                               hotKey          : (this.buttonsConfiguration[button[1]] ? this.buttonsConfiguration[button[1]].hotKey : null),
+                               dialog          : true
+                       };
+                       this.registerButton(buttonConfiguration);
+               }
+               
+               return true;
+        },
+        
+       /*
+        * The list of buttons added by this plugin
+        */
+       buttonList : [
+               ["ForeColor", "textcolor"],
+               ["HiliteColor", "bgcolor"]
+       ],
+
+       /*
+        * This function gets called when the button was pressed.
+        *
+        * @param       object          editor: the editor instance
+        * @param       string          id: the button id or the key
+        * @param       object          target: the target element of the contextmenu event, when invoked from the context menu
+        *
+        * @return      boolean         false if action is completed
+        */
+       onButtonPress : function(editor, id, target) {
+                       // Could be a button or its hotkey
+               var buttonId = this.translateHotKey(id);
+               buttonId = buttonId ? buttonId : id;
+               
+               switch (buttonId) {
+                       case "ForeColor"        :
+                       case "HiliteColor"      :
+                               this.dialogSelectColor(buttonId,"","");
+                               break;
+                       default:
+                               break;
+               }
+       },
+       
+       // this function requires the file PopupWin
+       dialogSelectColor : function (buttonId, element, field, opener) {
+               var editor = this.editor;
+               var windowWidth = 470;
+               var windowHeight = 245;
+               
+                       // buttonId's  "color" and "tag" are not registered but used to interface with the Table Operations and QuickTag plugins
+               switch (buttonId) {
+                       case "ForeColor"        :
+                       case "HiliteColor"      :
+                               var selectColorInitFunctRef = TYPO3Color.selectColorCOInit(this, buttonId);
+                               var setColorFunctRef = TYPO3Color.setColorCO(this);
+                               this.dialog = new PopupWin(this.editor, this.localize(buttonId + "_title"), setColorFunctRef, selectColorInitFunctRef, windowWidth, windowHeight, editor._iframe.contentWindow);
+                               break;
+                       case "color"            :
+                               var selectColorInitFunctRef = TYPO3Color.selectColorColorInit(this, buttonId, field);
+                               var setColorFunctRef = TYPO3Color.setColorColor(this, element, field);
+                               this.dialog = new PopupWin(this.editor, this.localize(buttonId + "_title"), setColorFunctRef, selectColorInitFunctRef, windowWidth, windowHeight, opener);
+                               break;
+                       case "tag"              :
+                               var selectColorInitFunctRef = TYPO3Color.selectColorTagInit(this, buttonId);
+                               var setColorFunctRef = TYPO3Color.setColorTag(this, field);
+                               this.dialog = new PopupWin(this.editor, this.localize("color_title"), setColorFunctRef, selectColorInitFunctRef, windowWidth, windowHeight, opener);
+               }
+       },
+       
+       // Applies the style found in "params" to the given element.
+       processStyle : function (dialog, params, element, field) {
+               var editor = this.editor;
+               for (var i in params) {
+                       var val = params[i];
+                       switch (i) {
+                               case "ForeColor":
+                                       if(val) {
+                                               editor._doc.execCommand("ForeColor", false, val);
+                                       } else {
+                                               var parentElement = editor.getParentElement();
+                                               parentElement.style.color = "";
+                                       }
+                                       break;
+                               case "HiliteColor":
+                                       if(val) {
+                                               if(HTMLArea.is_ie || HTMLArea.is_safari) editor._doc.execCommand("BackColor", false, val);
+                                                       else editor._doc.execCommand("HiliteColor", false, val);
+                                       } else {
+                                               var parentElement = editor.getParentElement();
+                                               parentElement.style.backgroundColor = "";
+                                       }
+                                       break;
+                               case "color":
+                                       element.style.backgroundColor = val;
+                                       field.value = val;
+                                       break;
+                       }
+               }
+       },
+       
+       /**
+        * Making color selector table
+        */
+       renderPopupSelectColor : function (sID,dialog,title) {
+               var editor = this.editor;
+               var cfgColors = this.colorsConfiguration;
+               var colorDef;
+               var szID = sID + "Current";
+               var sz;
+               var cPick = new Array("00","33","66","99","CC","FF");
+               var iColors = cPick.length;
+               var szColor = "";
+               var szColorId = "";
+               
+               sz = '<div class="title">' + title + '</div>';
+               sz += '<table style="width:100%"><tr><td id="HA-layout"><fieldset>';
+               sz += '<input type="hidden" name="' + sID + '" id="' + sID + '" value="" />';
+               sz += '<table style="width:100%;"><tr><td style="vertical-align: middle;"><span style="margin-left: 5px; height: 1em;" class="dialog buttonColor" ';
+               sz += '         onMouseover="className += \' buttonColor-hilite\';" ';
+               sz += '         onMouseout="className = \'buttonColor\';"> ';
+               sz += ' <span id="' + szID + '" class="chooser"></span> ';
+               sz += ' <span id="colorUnset" class="nocolor" title="' + this.localize("no_color") + '" ';
+               sz += '         onMouseover="className += \' nocolor-hilite\';" ';
+               sz += '         onMouseout="className = \'nocolor\';"';
+               sz += ' >&#x00d7;</span></span></td><td>';
+               sz += '<table ';
+               sz += ' onMouseout="document.getElementById(\'' + szID + '\').style.backgroundColor=\'\';" ';
+               sz += ' onMouseover="if(' + HTMLArea.is_ie + '){ if(event.srcElement.bgColor) document.getElementById(\'' + szID + '\').style.backgroundColor=event.srcElement.bgColor; } else { if (event.target.bgColor) document.getElementById(\'' + szID + '\').style.backgroundColor=event.target.bgColor; }" ';
+               sz += ' class="colorTable" cellspacing="0" cellpadding="0" id="colorTable">';
+                       // Making colorPicker
+               if (!this.disableColorPicker) {
+                       for ( var r = 0; r < iColors; r++) {
+                               sz+='<tr>';
+                               for (var g = iColors-1; g >= 0; g--) {
+                                       for (var b=iColors-1;b>=0;b--) {
+                                               szColor = cPick[r]+cPick[g]+cPick[b];
+                                               sz+='<td bgcolor="#'+szColor+'" title="#'+szColor+'">&nbsp;</td>';
+                                       }
+                               }
+                               sz+='</tr>';
+                       }
+               }
+               
+                       // Making specific color selector:
+               if (cfgColors) {
+                       var iCfgColors = cfgColors.length;
+                       if (iCfgColors && !this.disableColorPicker) {
+                               sz += '<tr><td colspan="36"></td></tr>';
+                       }
+                       for (var theColor = 0; theColor < iCfgColors; theColor++) {
+                               colorDef = cfgColors[theColor];
+                               szColor = colorDef[1];
+                               sz += '<tr>';
+                               sz += '<td style="width:36px;" colspan="6" bgcolor="'+szColor+'" title="'+szColor+'">&nbsp;</td>';
+                               sz += '<td colspan=2></td>';
+                               sz += '<td colspan=28><nobr>'+colorDef[0]+'</nobr></td>';
+                               sz += '</tr>';
+                       }
+               }
+               
+               sz += '</table></td></tr></table>';
+               sz += '</fieldset></td></tr><tr><td id="HA-style"></td></tr></table>';
+               return sz;
+       }
+});
+
+/*
+ * Initialize the forecolor and the hilitecolor select color dialogs
+ */
+TYPO3Color.selectColorCOInit = function(instance, buttonId) {
+       return (function(dialog) {
+               var editor = dialog.editor;
+               var doc = editor._doc;
+               dialog.content.innerHTML = instance.renderPopupSelectColor(buttonId, dialog, instance.localize(buttonId + "_title"));
+               var colorTable = dialog.doc.getElementById("colorTable");
+               colorTable.onclick = function(e) {
+                       if(!e) var e = dialog.dialogWindow.event;
+                       var targ = e.target ? e.target : e.srcElement;
+                       if (targ.nodeType == 3) targ = targ.parentNode;
+                       dialog.doc.getElementById(buttonId).value = targ.bgColor ? targ.bgColor : "";
+                       dialog.callHandler();
+                       return false;
+               };
+               var colorUnset = dialog.doc.getElementById("colorUnset");
+               colorUnset.onclick = function(e) {
+                       dialog.doc.getElementById(buttonId).value="";
+                       dialog.callHandler();
+                       return false;
+               };
+               try {
+                       with (dialog.doc.getElementById(buttonId+"Current").style) {
+                               switch (buttonId) {
+                                       case "ForeColor":
+                                               backgroundColor = HTMLArea._makeColor(doc.queryCommandValue("ForeColor"));
+                                               break;
+                                       case "HiliteColor":
+                                               backgroundColor = HTMLArea._makeColor(doc.queryCommandValue(((HTMLArea.is_ie || HTMLArea.is_safari) ? "BackColor" : "HiliteColor")));
+                                               if (/transparent/i.test(backgroundColor)) {
+                                                               // Mozilla
+                                                       backgroundColor = HTMLArea._makeColor(doc.queryCommandValue("BackColor"));
+                                               }
+                                               break;
+                               }
+                       }
+               } catch (e) { }
+               dialog.showAtElement();
+       });
+};
+
+/*
+ * Set the color and close the ForeColor and the HiliteColor select color dialogs
+ */
+TYPO3Color.setColorCO = function(instance) {
+       return (function(dialog,params) {
+               var editor = dialog.editor;
+               instance.processStyle(dialog, params, "", "");
+               dialog.releaseEvents();
+               editor.focusEditor();
+               editor.updateToolbar();
+               dialog.close();
+       });
+};
+
+/*
+ * Initialize the case=color select color dialog
+ * This case is used by the Table Operations plugin
+ */
+TYPO3Color.selectColorColorInit = function(instance,buttonId,field) {
+       return (function(dialog) {
+               dialog.content.innerHTML = instance.renderPopupSelectColor(buttonId, dialog, instance.localize(buttonId + "_title"));
+               var colorTable = dialog.doc.getElementById("colorTable");
+               colorTable.onclick = function(e) {
+                       if(!e) var e = dialog.dialogWindow.event;
+                       var targ = e.target ? e.target : e.srcElement;
+                       if (targ.nodeType == 3) targ = targ.parentNode;
+                       dialog.doc.getElementById(buttonId).value = targ.bgColor;
+                       dialog.callHandler();
+                       return false;
+               };
+               var colorUnset = dialog.doc.getElementById("colorUnset");
+               colorUnset.onclick = function(e) {
+                       dialog.doc.getElementById(buttonId).value = "";
+                       dialog.callHandler();
+                       return false;
+               };
+               dialog.doc.getElementById(buttonId+"Current").style.backgroundColor = field.value;
+               dialog.showAtElement();
+
+       });
+};
+
+/*
+ * Set the color and close the case=color select color dialog
+ */
+TYPO3Color.setColorColor = function(instance,element,field) {
+       return (function(dialog,params) {
+               instance.processStyle(dialog, params, element, field);
+               dialog.releaseEvents();
+               dialog.close();
+       });
+};
+
+/*
+ * Initialize the case=tag select color dialog
+ * This is used by the QuickTag plugin
+ */
+TYPO3Color.selectColorTagInit = function(instance, buttonId) {
+       return (function(dialog) {
+               instance.dialog = dialog;
+               dialog.content.innerHTML = instance.renderPopupSelectColor(buttonId, dialog, instance.localize("color_title"));
+               var colorTable = dialog.doc.getElementById("colorTable");
+               colorTable.onclick = function(e) {
+                       if(!e) var e = dialog.dialogWindow.event;
+                       var targ = e.target ? e.target : e.srcElement;
+                       if (targ.nodeType == 3) targ = targ.parentNode;
+                       dialog.doc.getElementById(buttonId).value = targ.bgColor;
+                       dialog.callHandler();
+                       return false;
+               };
+               var colorUnset = dialog.doc.getElementById("colorUnset");
+               colorUnset.onclick = function(e) {
+                       dialog.doc.getElementById(buttonId).value = "";
+                       dialog.callHandler();
+                       return false;
+               };
+               dialog.doc.getElementById(buttonId+"Current").style.backgroundColor = "";
+               dialog.showAtElement();
+       });
+};
+
+/*
+ * Set the color and close the case=color select color dialog
+ */
+TYPO3Color.setColorTag = function(instance,field) {
+       return (function(dialog,params) {
+               dialog.releaseEvents();
+               field.insertColor(params["tag"]);
+               dialog.close();
+       });
+};
+
index 165a044..f235eda 100644 (file)
@@ -6,6 +6,7 @@
        </meta>
        <data type="array">
                <languageKey index="default" type="array">
+                       <label index="CleanWord-Tooltip">Clean up HTML content</label>
                </languageKey>
        </data>
        <orig_hash type="array">
index 9cc4531..35dce20 100644 (file)
@@ -1,7 +1,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2005-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 /**
  * TYPO3HtmlParser Plugin for TYPO3 htmlArea RTE
  *
- * TYPO3 CVS ID: $Id$
+ * TYPO3 SVN ID: $Id$
  */
-TYPO3HtmlParser = function(editor) {
-       this.editor = editor;
-       var cfg = editor.config;
-};
-
-TYPO3HtmlParser.I18N = TYPO3HtmlParser_langArray;
-
-TYPO3HtmlParser._pluginInfo = {
-       name            : "TYPO3HtmlParser",
-       version         : "1.6",
-       developer       : "Stanislas Rolland",
-       developer_url   : "http://www.fructifor.ca/",
-       c_owner         : "Stanislas Rolland",
-       sponsor         : "Fructifor Inc.",
-       sponsor_url     : "http://www.fructifor.ca/",
-       license         : "GPL"
-};
-
-HTMLArea._wordClean = function(editor, body) {
-       var editorNo = editor._editorNumber;
-       var url = RTEarea[0]["pathParseHtmlModule"];
-       var addParams = RTEarea[editorNo]["RTEtsConfigParams"];
-       HTMLArea._postback(url, {'editorNo' : editorNo, 'content' : body.innerHTML },
-               function(javascriptResponse) { editor.setHTML(javascriptResponse) }, addParams, RTEarea[editor._editorNumber]["typo3ContentCharset"]);
-       return true;
-};
+TYPO3HtmlParser = HTMLArea.Plugin.extend({
+       
+       constructor : function(editor, pluginName) {
+               this.base(editor, pluginName);
+       },
+       
+       /*
+        * This function gets called by the class constructor
+        */
+       configurePlugin : function(editor) {
+               
+               this.pageTSConfiguration = this.editorConfiguration.buttons.cleanword;
+               this.parseHtmlModulePath = this.pageTSConfiguration.pathParseHtmlModule;
+               this.cleanLaterFunctRef = this.makeFunctionReference("cleanLater");
+               
+               /*
+                * Registering plugin "About" information
+                */
+               var pluginInformation = {
+                       version         : "1.7",
+                       developer       : "Stanislas Rolland",
+                       developerUrl    : "http://www.fructifor.ca/",
+                       copyrightOwner  : "Stanislas Rolland",
+                       sponsor         : "Fructifor Inc.",
+                       sponsorUrl      : "http://www.fructifor.ca/",
+              &