[FEATURE][!!!][CONF] Deprecate various RTE configuration properties
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 20 Jul 2011 02:54:55 +0000 (22:54 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 29 Jul 2011 14:09:18 +0000 (16:09 +0200)
This feature is a first step at simplifying the RTE configuration.

 * Deprecate various, mostly legacy properties, and restructure
   some others in order to make the configuration structure more
   homogeneous.
 * Remove any deprecated properties from the default RTE
   configurations.
 * Provide an Install tool upgrade wizard for substituting some
   of the deprecated properties by their replacement properties and
   reporting the uid's of pages that specify deprecated properties
   that could not be replaced by the wizard; the wizard warns that
   some deprecated properties may be specified in included external
   files; those will need to be updated by the user.
 * Log to the deprecation log any usage of deprecated properties. Allow to
   disable logging of deprecated properties by setting Page
   TS Config property RTE.default.logDeprecatedProperties.disabled = 1.
   Allow to optionally log also to the BE log by setting
   RTE.default.logDeprecatedProperties.logAlsoToBELog = 1.

Change-Id: I3992d308702500ea39a2e7944eea687150995791
Resolves: #28325
Releases: 4.6
Reviewed-on: http://review.typo3.org/3425
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
Reviewed-by: Georg Ringer
19 files changed:
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/ContextMenu/class.tx_rtehtmlarea_contextmenu.php
typo3/sysext/rtehtmlarea/extensions/SelectFont/class.tx_rtehtmlarea_selectfont.php
typo3/sysext/rtehtmlarea/extensions/TYPO3Image/class.tx_rtehtmlarea_typo3image.php
typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php
typo3/sysext/rtehtmlarea/hooks/install/class.tx_rtehtmlarea_deprecatedrteproperties.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js
typo3/sysext/rtehtmlarea/locallang.xml
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php
typo3/sysext/rtehtmlarea/res/accessibilityicons/pageTSConfig.txt
typo3/sysext/rtehtmlarea/res/advanced/pageTSConfig.txt
typo3/sysext/rtehtmlarea/res/demo/pageTSConfig.txt
typo3/sysext/rtehtmlarea/res/indentalign/pageTSConfig.txt
typo3/sysext/rtehtmlarea/res/typical/pageTSConfig.txt

index 2311983..42dc80e 100644 (file)
@@ -837,6 +837,16 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        RTEarea[editornumber].useHTTPS = ' . ((trim(stristr($this->siteURL, 'https')) || $this->thisConfig['forceHTTPS'])?'true':'false') . ';
                        RTEarea[editornumber].tceformsNested = ' . (is_object($this->TCEform) && method_exists($this->TCEform, 'getDynNestedStack') ? $this->TCEform->getDynNestedStack(TRUE) : '[]') . ';
                        RTEarea[editornumber].dialogueWindows = new Object();';
+                       // The following property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['showTagFreeClasses'])) {
+                       $this->logDeprecatedProperty('showTagFreeClasses', 'buttons.blockstyle.showTagFreeClasses', '4.8');
+                       $this->logDeprecatedProperty('showTagFreeClasses', 'buttons.textstyle.showTagFreeClasses', '4.8');
+               }
+                       // The following property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['disablePCexamples'])) {
+                       $this->logDeprecatedProperty('disablePCexamples', 'buttons.blockstyle.disableStyleOnOptionLabel', '4.8');
+                       $this->logDeprecatedProperty('disablePCexamples', 'buttons.textstyle.disableStyleOnOptionLabel', '4.8');
+               }
                if (isset($this->thisConfig['dialogueWindows.']['defaultPositionFromTop'])) {
                        $configureRTEInJavascriptString .= '
                        RTEarea[editornumber].dialogueWindows.positionFromTop = ' . intval($this->thisConfig['dialogueWindows.']['defaultPositionFromTop']) . ';';
@@ -895,6 +905,8 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        RTEarea[editornumber].htmlRemoveTagsAndContents = /^(' . implode('|', t3lib_div::trimExplode(',', $this->thisConfig['removeTagsAndContents'], 1)) . ')$/i;';
                }
                        // Process default style configuration
+                       // This default configuration is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8.
+                       // Use contentCSS instead.
                $configureRTEInJavascriptString .= '
                        RTEarea[editornumber].defaultPageStyle = "' . $this->writeTemporaryFile('', 'defaultPageStyle', 'css', $this->buildStyleSheet()) . '";';
                        // Setting the pageStyle
@@ -944,12 +956,26 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
         * Build the default content style sheet
         *
         * @return string               Style sheet
+        * @deprecated since TYPO3 4.6, will be removed in TYPO3 4.8
         */
        function buildStyleSheet() {
-
+                       // This function is DEPRECATED as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               t3lib_div::logDeprecatedFunction();
+                       // These PageTSConfig properties are DEPRECATED as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               $properties = array('mainStyle_font', 'mainStyle_size', 'mainStyle_color', 'mainStyle_bgcolor', 'mainStyleOverride');
+               foreach ($properties as $property) {
+                       if (isset($this->thisConfig[$property])) {
+                               $this->logDeprecatedProperty($property, 'contentCSS', '4.8');
+                       }
+               }
+               if (is_array($this->thisConfig['mainStyleOverride_add.'])) {
+                       $this->logDeprecatedProperty('mainStyleOverride_add', 'contentCSS', '4.8');
+               }
+               if (is_array($this->thisConfig['inlineStyle.']))        {
+                       $this->logDeprecatedProperty('inlineStyle', 'contentCSS', '4.8');
+               }
                if (!trim($this->thisConfig['ignoreMainStyleOverride'])) {
                        $mainStyle_font = $this->thisConfig['mainStyle_font'] ? $this->thisConfig['mainStyle_font']: 'Verdana,sans-serif';
-
                        $mainElements = array();
                        $mainElements['P'] = $this->thisConfig['mainStyleOverride_add.']['P'];
                        $elList = explode(',','H1,H2,H3,H4,H5,H6,PRE');
@@ -996,15 +1022,20 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
         */
        function buildJSClassesConfig($RTEcounter) {
                        // Build JS array of lists of classes
+                       // These PageTSConfig properties are DEPRECATED as of TYPO3 4.6 and will be removed in TYPO3 4.8
                $classesTagList = 'classesCharacter, classesParagraph, classesImage, classesTable, classesLinks, classesTD';
-               $classesTagConvert = array( 'classesCharacter' => 'span', 'classesParagraph' => 'div', 'classesImage' => 'img', 'classesTable' => 'table', 'classesLinks' => 'a', 'classesTD' => 'td');
+               $classesTagConvert = array('classesCharacter' => 'span', 'classesParagraph' => 'div', 'classesImage' => 'img', 'classesTable' => 'table', 'classesLinks' => 'a', 'classesTD' => 'td');
+               $classesUseInstead = array('classesCharacter' => 'buttons.textstyle.tags.span.allowedClasses', 'classesParagraph' => 'buttons.blockstyle.tags.div.allowedClasses', 'classesImage' => 'buttons.image.properties.class.allowedClasses', 'classesTable' => 'buttons.blockstyle.tags.table.allowedClasses', 'classesLinks' => 'buttons.link.properties.class.allowedClasses', 'classesTD' => 'buttons.blockstyle.tags.td.allowedClasses');
                $classesTagArray = t3lib_div::trimExplode(',' , $classesTagList);
                $configureRTEInJavascriptString = '
                        RTEarea[editornumber].classesTag = new Object();';
                foreach ($classesTagArray as $classesTagName) {
-                       $HTMLAreaJSClasses = ($this->thisConfig[$classesTagName])?('"' . $this->cleanList($this->thisConfig[$classesTagName]) . '";'):'null;';
+                       $HTMLAreaJSClasses = $this->thisConfig[$classesTagName] ? ('"' . $this->cleanList($this->thisConfig[$classesTagName]) . '";') : 'null;';
                        $configureRTEInJavascriptString .= '
                        RTEarea[editornumber].classesTag.'. $classesTagConvert[$classesTagName] .' = '. $HTMLAreaJSClasses;
+                       if (isset($this->thisConfig[$classesTagName])) {
+                               $this->logDeprecatedProperty($classesTagName, $classesUseInstead[$classesTagName], '4.8');
+                       }
                }
                        // Include JS arrays of configured classes
                $configureRTEInJavascriptString .= '
@@ -1420,6 +1451,25 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                }
                return $browserInfo;
        }
+       /**
+        * Log usage of deprecated Page TS Config Property
+        *
+        * @param string $deprecatedProperty: Name of deprecated property
+        * @param string $useProperty: Name of property to use instead
+        * @param string $version: Version of TYPO3 in which the property will be removed
+        *
+        * @return void
+        */
+       public function logDeprecatedProperty ($deprecatedProperty, $useProperty, $version) {
+               if (!$this->thisConfig['logDeprecatedProperties.']['disabled']) {
+                       $message = sprintf('RTE Page TSConfig property "%1$s" used on page id #%4$s is DEPRECATED and will be removed in TYPO3 %3$s. Use "%2$s" instead.', $deprecatedProperty, $useProperty, $version, $this->thePid);
+                       t3lib_div::deprecationLog($message);
+                       if (is_object($GLOBALS['BE_USER']) && $this->thisConfig['logDeprecatedProperties.']['logAlsoToBELog']) {
+                               $message = sprintf($GLOBALS['LANG']->getLL('deprecatedPropertyMessage'), $deprecatedProperty, $useProperty, $version, $this->thePid);
+                               $GLOBALS['BE_USER']->simplelog($message, $this->ID);
+                       }
+               }
+       }
        /***************************
         *
         * OTHER FUNCTIONS:     (from Classic RTE)
index 97dd02d..b8c997e 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/doc/manual.sxw and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
index 9faa8fd..7b1e376 100644 (file)
@@ -47,7 +47,7 @@ $_EXTCONF = unserialize($_EXTCONF);
        // Add default RTE transformation configuration
 t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/proc/pageTSConfig.txt">');
 
-       // Add default Page TSonfig RTE configuration
+       // Add default Page TS Config RTE configuration
 if (strstr($_EXTCONF['defaultConfiguration'],'Minimal')) {
        $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] = 'Advanced';
 } elseif (strstr($_EXTCONF['defaultConfiguration'],'Demo')) {
@@ -57,7 +57,7 @@ if (strstr($_EXTCONF['defaultConfiguration'],'Minimal')) {
 }
 t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/' . strtolower($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration']) . '/pageTSConfig.txt">');
 
-       // Add default User TSonfig RTE configuration
+       // Add default User TS Config RTE configuration
 t3lib_extMgm::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/' . strtolower($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration']) . '/userTSConfig.txt">');
 
        // Add Clear RTE Cache to Clear Cache menu
@@ -72,6 +72,9 @@ $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableCompressedScripts'] = (isset($_EXTC
 if (t3lib_extMgm::isLoaded('lorem_ipsum') && (TYPO3_MODE == 'BE')) {
     $TYPO3_CONF_VARS['EXTCONF']['lorem_ipsum']['RTE_insert'][] = 'tx_rtehtmlarea_base->loremIpsumInsert';
 }
+       // Set warning in the Update Wizard of the Install Tool for deprecated Page TS Config properties
+$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['checkForDeprecatedRtePageTSConfigProperties'] = 'EXT:'.$_EXTKEY.'/hooks/install/class.tx_rtehtmlarea_deprecatedrteproperties.php:&tx_rtehtmlarea_deprecatedRteProperties';
+
        // Initialize plugin registration array
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins'] = array();
        // Editor Mode configuration
@@ -135,7 +138,7 @@ $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UserElements']['disableInFE']
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TextStyle'] = array();
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TextStyle']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TextStyle/class.tx_rtehtmlarea_textstyle.php:&tx_rtehtmlarea_textstyle';
 
-       // Enable images and add default Page TSonfig RTE configuration for enabling images with the Minimal and Typical default configuration
+       // Enable images and add default Page TS Config RTE configuration for enabling images with the Minimal and Typical default configuration
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages'] = $_EXTCONF['enableImages'] ? $_EXTCONF['enableImages'] : 0;
 if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] == 'Demo') {
        $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages'] = 1;
@@ -160,7 +163,7 @@ $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['objectReference']
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['addIconsToSkin'] = 0;
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['disableInFE'] = 1;
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['additionalAttributes'] = 'rel';
-       // Add default Page TSonfig RTE configuration for enabling links accessibility icons
+       // Add default Page TS Config RTE configuration for enabling links accessibility icons
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableAccessibilityIcons'] = $_EXTCONF['enableAccessibilityIcons'] ? $_EXTCONF['enableAccessibilityIcons'] : 0;
 if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableAccessibilityIcons']) {
        t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/accessibilityicons/pageTSConfig.txt">');
index 4e76d3e..3811ff2 100644 (file)
@@ -104,7 +104,11 @@ class tx_rtehtmlarea_blockelements extends tx_rtehtmlarea_api {
                        if (is_array($this->thisConfig['buttons.']) && is_array($this->thisConfig['buttons.']['formatblock.'])) {
                                        // Removing elements
                                if ($this->thisConfig['buttons.']['formatblock.']['removeItems']) {
-                                       $hideItems =  t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList(t3lib_div::strtolower($this->thisConfig['buttons.']['formatblock.']['removeItems'])), 1);
+                                       if ($this->htmlAreaRTE->cleanList($this->thisConfig['buttons.']['formatblock.']['removeItems']) == '*') {
+                                               $hideItems = array_diff(array_keys($defaultBlockElements), array('none'));
+                                       } else {
+                                               $hideItems =  t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList(t3lib_div::strtolower($this->thisConfig['buttons.']['formatblock.']['removeItems'])), 1);
+                                       }
                                }
                                        // Adding elements
                                if ($this->thisConfig['buttons.']['formatblock.']['addItems']) {
@@ -122,8 +126,10 @@ class tx_rtehtmlarea_blockelements extends tx_rtehtmlarea_api {
                                $postfixLabelWithTag = ($this->thisConfig['buttons.']['formatblock.']['postfixLabelWithTag']) ? TRUE : $postfixLabelWithTag;
                        }
                                // Processing old style configuration for hiding paragraphs
-                       if ($this->thisConfig['hidePStyleItems']) {
+                               // DEPRECATED property will be removed in TYPO3 4.8
+                       if (isset($this->thisConfig['hidePStyleItems'])) {
                                $hideItems = array_merge($hideItems, t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList(t3lib_div::strtolower($this->thisConfig['hidePStyleItems'])), 1));
+                               $this->htmlAreaRTE->logDeprecatedProperty('hidePStyleItems', 'buttons.formatblock.removeItems', '4.8');
                        }
                                // Adding custom items
                        $blockElementsOrder = array_merge(t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList($blockElementsOrder), 1), $addItems);
@@ -134,25 +140,23 @@ class tx_rtehtmlarea_blockelements extends tx_rtehtmlarea_api {
                        }
                                // Localizing the options
                        $blockElementsOptions = array();
-                       if ($this->htmlAreaRTE->cleanList($this->thisConfig['hidePStyleItems']) != '*') {
-                               $labels = array();
-                               if (is_array($this->thisConfig['buttons.'])
-                                               && is_array($this->thisConfig['buttons.']['formatblock.'])
-                                               && is_array($this->thisConfig['buttons.']['formatblock.']['items.'])) {
-                                       $labels = $this->thisConfig['buttons.']['formatblock.']['items.'];
+                       $labels = array();
+                       if (is_array($this->thisConfig['buttons.'])
+                                       && is_array($this->thisConfig['buttons.']['formatblock.'])
+                                       && is_array($this->thisConfig['buttons.']['formatblock.']['items.'])) {
+                               $labels = $this->thisConfig['buttons.']['formatblock.']['items.'];
+                       }
+                       foreach ($blockElementsOrder as $item) {
+                               if ($this->htmlAreaRTE->is_FE()) {
+                                       $blockElementsOptions[$item] = $TSFE->getLLL($this->defaultBlockElements[$item], $this->LOCAL_LANG);
+                               } else {
+                                       $blockElementsOptions[$item] = $LANG->getLL($this->defaultBlockElements[$item]);
                                }
-                               foreach ($blockElementsOrder as $item) {
-                                       if ($this->htmlAreaRTE->is_FE()) {
-                                               $blockElementsOptions[$item] = $TSFE->getLLL($this->defaultBlockElements[$item],$this->LOCAL_LANG);
-                                       } else {
-                                               $blockElementsOptions[$item] = $LANG->getLL($this->defaultBlockElements[$item]);
-                                       }
                                        // Getting custom labels
-                                       if (is_array($labels[$item.'.']) && $labels[$item.'.']['label']) {
-                                               $blockElementsOptions[$item] = $this->htmlAreaRTE->getPageConfigLabel($labels[$item.'.']['label'], 0);
-                                       }
-                                       $blockElementsOptions[$item] = (($prefixLabelWithTag && $item != 'none')?($item . ' - '):'') . $blockElementsOptions[$item] . (($postfixLabelWithTag && $item != 'none')?(' - ' . $item):'');
+                               if (is_array($labels[$item.'.']) && $labels[$item.'.']['label']) {
+                                       $blockElementsOptions[$item] = $this->htmlAreaRTE->getPageConfigLabel($labels[$item.'.']['label'], 0);
                                }
+                               $blockElementsOptions[$item] = (($prefixLabelWithTag && $item != 'none')?($item . ' - '):'') . $blockElementsOptions[$item] . (($postfixLabelWithTag && $item != 'none')?(' - ' . $item):'');
                        }
 
                        $first = array_shift($blockElementsOptions);
index 1ab1a47..e59716e 100644 (file)
@@ -42,7 +42,17 @@ class tx_rtehtmlarea_contextmenu extends tx_rtehtmlarea_api {
        protected $convertToolbarForHtmlAreaArray = array ();
 
        public function main($parentObject) {
-               return parent::main($parentObject) && !($this->htmlAreaRTE->client['browser'] == 'opera' || $this->thisConfig['disableContextMenu'] || $this->thisConfig['disableRightClick']);
+               $enabled = parent::main($parentObject) && !($this->htmlAreaRTE->client['browser'] == 'opera' || $this->thisConfig['contextMenu.']['disabled']);
+                       // DEPRECATED properties will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['disableRightClick'])) {
+                       $enabled = $enabled && !$this->thisConfig['disableRightClick'];
+                       $this->htmlAreaRTE->logDeprecatedProperty('disableRightClick', 'contextMenu.disabled', '4.8');
+               }
+               if (isset($this->thisConfig['disableContextMenu'])) {
+                       $enabled = $enabled && !$this->thisConfig['disableContextMenu'];
+                       $this->htmlAreaRTE->logDeprecatedProperty('disableContextMenu', 'contextMenu.disabled', '4.8');
+               }
+               return $enabled;
        }
        /**
         * Return JS configuration of the htmlArea plugins registered by the extension
index a6be6ee..e4bbb5a 100644 (file)
@@ -113,10 +113,20 @@ class tx_rtehtmlarea_selectfont extends tx_rtehtmlarea_api {
         */
        protected function buildJSFontItemsConfig($RTEcounter, $buttonId) {
                $configureRTEInJavascriptString = '';
-
+               $hideItems = '';
+               $addItems = array();
+                       // These Page TSConfig properties are DEPRECATED as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               $hideProperty = 'hideFont' .  (($buttonId == 'fontstyle') ? 'Faces' : 'Sizes');
+               if (isset($this->thisConfig[$hideProperty])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty($hideProperty, 'buttons.' . $buttonId . '.removeItems', '4.8');
+               }
+               $hideItems = $this->htmlAreaRTE->cleanList($this->thisConfig[$hideProperty]);
+               $addProperty = ($buttonId == 'fontstyle') ? 'fontFace' : 'fontSize';
+               if (isset($this->thisConfig[$addProperty])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty($addProperty, 'buttons.' . $buttonId . '.addItems', '4.8');
+               }
+               $addItems = t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList($this->thisConfig[$addProperty]), 1);
                        // Getting removal and addition configuration
-               $hideItems = $this->htmlAreaRTE->cleanList($this->thisConfig['hideFont' .  (($buttonId == 'fontstyle') ? 'Faces' : 'Sizes')]);
-               $addItems = t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList($this->thisConfig[($buttonId == 'fontstyle') ? 'fontFace' : 'fontSize']), 1);
                if (is_array($this->thisConfig['buttons.']) && is_array($this->thisConfig['buttons.'][$buttonId . '.'])) {
                        if ($this->thisConfig['buttons.'][$buttonId . '.']['removeItems']) {
                                $hideItems = $this->thisConfig['buttons.'][$buttonId . '.']['removeItems'];
index 8e4ff9b..ce211e3 100644 (file)
@@ -44,12 +44,25 @@ class tx_rtehtmlarea_typo3image extends tx_rtehtmlarea_api {
                );
 
        public function main($parentObject) {
+               $enabled = parent::main($parentObject);
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['blindImageOptions'])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty('blindImageOptions', 'buttons.image.options.removeItems', '4.8');
+               }
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['classesImage'])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty('classesImage', 'buttons.image.properties.class.allowedClasses', '4.8');
+               }
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['disableTYPO3Browsers'])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty('disableTYPO3Browsers', 'buttons.image.TYPO3Browser.disabled', '4.8');
+               }
                        // Check if this should be enabled based on extension configuration and Page TSConfig
                        // The 'Minimal' and 'Typical' default configurations include Page TSConfig that removes images on the way to the database
-               return parent::main($parentObject)
-                       && !($this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['allowedAttribs'] == '0' && $this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['rmTagIfNoAttrib'] == '1')
+               $enabled = $enabled && !($this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['allowedAttribs'] == '0' && $this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['rmTagIfNoAttrib'] == '1')
                        && !$this->thisConfig['disableTYPO3Browsers']
                        && !$this->thisConfig['buttons.']['image.']['TYPO3Browser.']['disabled'];
+               return $enabled;
        }
 
        /**
index c8fc7b3..154de08 100644 (file)
@@ -45,9 +45,30 @@ class tx_rtehtmlarea_typo3link extends tx_rtehtmlarea_api {
                );
 
        public function main($parentObject) {
+               $enabled = parent::main($parentObject);
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['blindLinkOptions'])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty('blindLinkOptions', 'buttons.link.options.removeItems', '4.8');
+               }
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['disableTYPO3Browsers'])) {
+                       $enabled = $enabled && !$this->thisConfig['disableTYPO3Browsers'];
+                       $this->htmlAreaRTE->logDeprecatedProperty('disableTYPO3Browsers', 'buttons.link.TYPO3Browser.disabled', '4.8');
+               }
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['classesAnchor'])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty('RTE.default.classesAnchor', 'RTE.default.buttons.link.properties.class.allowedClasses', '4.8');
+               }
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['classesAnchor.'])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty('classesAnchor.default.[link-type]', 'buttons.link.[link-type].properties.class.default', '4.8');
+               }
+                       // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if (isset($this->thisConfig['defaultLinkTarget'])) {
+                       $this->htmlAreaRTE->logDeprecatedProperty('defaultLinkTarget', 'buttons.link.properties.target.default', '4.8');
+               }
                        // Check if this should be enabled based on Page TSConfig
-               return parent::main($parentObject) && !$this->thisConfig['disableTYPO3Browsers']
-                               && !(is_array( $this->thisConfig['buttons.']) && is_array($this->thisConfig['buttons.']['link.']) && is_array($this->thisConfig['buttons.']['link.']['TYPO3Browser.']) && $this->thisConfig['buttons.']['link.']['TYPO3Browser.']['disabled']);
+               return $enabled && !$this->thisConfig['buttons.']['link.']['TYPO3Browser.']['disabled'];
        }
 
        /**
diff --git a/typo3/sysext/rtehtmlarea/hooks/install/class.tx_rtehtmlarea_deprecatedrteproperties.php b/typo3/sysext/rtehtmlarea/hooks/install/class.tx_rtehtmlarea_deprecatedrteproperties.php
new file mode 100644 (file)
index 0000000..a77e960
--- /dev/null
@@ -0,0 +1,238 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2011 Stanislas Rolland <typo3@sjbr.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!
+***************************************************************/
+
+/**
+ * Contains the update class for the replacement of deprecated RTE properties in Page TS Config. Used by the update wizard in the install tool.
+ *
+ * @author Stanislas Rolland <typo3@sjbr.ca>
+ */
+class tx_rtehtmlarea_deprecatedRteProperties extends Tx_Install_Updates_Base {
+       protected $title = 'Deprecated RTE properties in Page TS Config';
+               // Properties that may be replaced automatically in Page TS Config (except inludes from external files)
+       protected $replacementRteProperties = array(
+               'disableRightClick' => 'contextMenu.disable',
+               'disableContextMenu' => 'contextMenu.disable',
+               'hidePStyleItems' => 'buttons.formatblock.removeItems',
+               'hideFontFaces' => 'buttons.fontstyle.removeItems',
+               'fontFace' => 'buttons.fontstyle.addItems',
+               'hideFontSizes' => 'buttons.fontsize.removeItems',
+               'fontSize' => 'buttons.fontsize.addItems',
+               'classesCharacter' => 'buttons.textstyle.tags.span.allowedClasses',
+               'classesParagraph' => 'buttons.blockstyle.tags.div.allowedClasses',
+               'classesTable' => 'buttons.blockstyle.tags.table.allowedClasses',
+               'classesTD' => 'buttons.blockstyle.tags.td.allowedClasses',
+               'classesImage' => 'buttons.image.properties.class.allowedClasses',
+               'classesLinks' => 'buttons.link.properties.class.allowedClasses',
+               'blindImageOptions' => 'buttons.image.options.removeItems',
+               'blindLinkOptions' => 'buttons.link.options.removeItems',
+               'defaultLinkTarget' => 'buttons.link.properties.target.default',
+               );
+       protected $doubleReplacementRteProperties = array(
+               'disableTYPO3Browsers' => array(
+                       'buttons.image.TYPO3Browser.disabled',
+                       'buttons.link.TYPO3Browser.disabled',
+                       ),
+               'showTagFreeClasses' => array(
+                       'buttons.blockstyle.showTagFreeClasses',
+                       'buttons.textstyle.showTagFreeClasses',
+                       ),
+               'disablePCexamples' => array(
+                       'buttons.blockstyle.disableStyleOnOptionLabel',
+                       'buttons.textstyle.disableStyleOnOptionLabel',
+                       ),
+               );
+               // Properties that may not be replaced automatically in Page TS Config
+       protected $useInsteadRteProperties = array(
+               'RTE.default.classesAnchor' => 'RTE.default.buttons.link.properties.class.allowedClasses',
+               'RTE.default.classesAnchor.default.[link-type]' => 'RTE.default.buttons.link.[link-type].properties.class.default',
+               'mainStyleOverride' => 'contentCSS',
+               'mainStyleOverride_add.[key]' => 'contentCSS',
+               'mainStyle_font' => 'contentCSS',
+               'mainStyle_size' => 'contentCSS',
+               'mainStyle_color' => 'contentCSS',
+               'mainStyle_bgcolor' => 'contentCSS',
+               'inlineStyle.[any-keystring]' => 'contentCSS',
+               'ignoreMainStyleOverride' => 'n.a.',
+               );
+
+       /**
+        * Function which checks if update is needed. Called in the beginning of an update process.
+        *
+        * @param       string          pointer to description for the update
+        * @return      boolean         TRUE if update is needs to be performed, FALSE otherwise.
+        */
+       public function checkForUpdate(&$description) {
+               $result = FALSE;
+                       // TYPO3 version 4.6 and above
+               if ($this->versionNumber >= 4006000) {
+                       $pages = $this->getPagesWithDeprecatedRteProperties($dbQueries, $customMessages);
+                       $pagesCount = count($pages);
+                       $deprecatedProperties = '';
+                       $deprecatedRteProperties = array_merge($this->replacementRteProperties, $this->useInsteadRteProperties);
+                       foreach ($deprecatedRteProperties as $deprecatedProperty => $replacementProperty) {
+                               $deprecatedProperties .= '<tr><td>' . $deprecatedProperty . '</td><td>' . $replacementProperty . '</td></tr>' . LF;
+                       }
+                       foreach ($this->doubleReplacementRteProperties as $deprecatedProperty => $replacementProperties) {
+                               $deprecatedProperties .= '<tr><td>' . $deprecatedProperty . '</td><td>' . implode(' and ', $replacementProperties) . '</td></tr>' . LF;
+                       }
+                       $description = '<p>The following Page TS Config RTE properties are deprecated since TYPO3 4.6 and will be removed in TYPO3 4.8.</p>' . LF .
+                               '<table><thead><tr><th>Deprecated property</th><th>Use instead</th></tr></thead>' . LF . '<tbody>' . $deprecatedProperties . '</tboby></table>' . LF .
+                               '<p>You are currently using some of these properties on <strong>' . strval($pagesCount) . '&nbsp;pages</strong>  (including deleted and hidden pages).</p>' . LF;
+                       if ($pagesCount) {
+                               $pagesUids = array();
+                               foreach ($pages as $page) {
+                                       $pagesUids[] = $page['uid'];
+                               }
+                               $description .= '<p>Pages id\'s: ' . implode(', ', $pagesUids) . '</p>';
+                       }
+                       $replacementProperties = '';
+                       foreach ($this->useInsteadRteProperties as $deprecatedProperty => $replacementProperty) {
+                               $replacementProperties .= '<tr><td>' . $deprecatedProperty . '</td><td>' . $replacementProperty . '</td></tr>' . LF;
+                       }
+                       if ($pagesCount) {
+                               $updateablePages = $this->findUpdateablePagesWithDeprecatedRteProperties($pages);
+                               if (count($updateablePages)) {
+                                       $replacementProperties = '';
+                                       foreach ($this->replacementRteProperties as $deprecatedProperty => $replacementProperty) {
+                                               $replacementProperties .= '<tr><td>' . $deprecatedProperty . '</td><td>' . $replacementProperty . '</td></tr>' . LF;
+                                       }
+                                       $description .= '<p>This wizard will perform automatic replacement of the following properties on <strong>' . strval(count($updateablePages)) . '&nbsp;pages</strong> (including deleted and hidden):</p>' . LF .
+                                               '<table><thead><tr><th>Deprecated property</th><th>Will be replaced by</th></tr></thead><tbody>' . $replacementProperties . '</tboby></table>' . LF .
+                                               '<p>The Page TS Config column of the remaining pages will need to be updated manually.</p>' . LF;
+                               } else {
+                                       $replacementProperties = '';
+                                       foreach (array_keys(array_merge($this->useInsteadRteProperties, $this->doubleReplacementRteProperties)) as $deprecatedProperty) {
+                                               $replacementProperties .= '<tr><td>' . $deprecatedProperty . '</td></tr>' . LF;
+                                       }
+                                       $description .= '<p>This wizard cannot update the following properties, some of which are present on those pages:</p>' . LF .
+                                               '<table><thead><tr><th>Deprecated property</th></tr></thead><tbody>' . $replacementProperties . '</tboby></table>' . LF .
+                                               '<p>Therefore, the Page TS Config column of those pages will need to be updated manually.</p>' . LF;
+                               }
+                       }
+                       $description .= '<p>Note that Page TS Config may be included from external files. These will not be updated by this wizard. If required, the update will need to be done manually.</p>' . LF .
+                               '<p>Note also that deprecated properties have been replaced in default configurations provided by htmlArea RTE';
+                       $result = TRUE;
+               }
+               return $result;
+       }
+
+       /**
+        * Performs the update itself
+        *
+        * @param       array           pointer where to insert all DB queries made, so they can be shown to the user if wanted
+        * @param       string          pointer to output custom messages
+        * @return      boolean         TRUE if update succeeded, FALSE otherwise
+        */
+       public function performUpdate(&$dbQueries, &$customMessages) {
+               $pages = $this->getPagesWithDeprecatedRteProperties($dbQueries, $customMessages);
+               if (count($pages)) {
+                       $updateablePages = $this->findUpdateablePagesWithDeprecatedRteProperties($pages);
+                       if (count($updateablePages)) {
+                               $this->updatePages($updateablePages, $dbQueries, $customMessages);
+                       } else {
+                               $customMessages = '<p>The wizard was unable to automatically replace any of the deprecated Page TS Config properties used. They will have to be replaced manually.</p>';
+                       }
+               } else {
+                       $customMessages = '<p>No deprecated Page TS Config properties were found on page records.</p>' . LF .
+                               '<p>Note that Page TS Config may be included from external files. These were not updated by this wizard. If required, the update will need to be done manually.</p>';
+               }
+               return empty($customMessages);
+       }
+
+       /**
+        * Gets the pages with deprecated RTE properties in TSConfig column
+        *
+        * @param       array           pointer where to insert all DB queries made, so they can be shown to the user if wanted
+        * @param       string          pointer to output custom messages
+        * @return      array           uid and inclusion string for the pages with deprecated RTE properties in TSConfig column
+        */
+       protected function getPagesWithDeprecatedRteProperties(&$dbQueries, &$customMessages) {
+               $fields = 'uid, TSconfig';
+               $table = 'pages';
+               $deprecatedRteProperties = array_keys(array_merge($this->replacementRteProperties, $this->useInsteadRteProperties, $this->doubleReplacementRteProperties));
+               $where = '';
+               foreach ($deprecatedRteProperties as $deprecatedRteProperty) {
+                       $where .= ($where ? ' OR ' : '') . 'TSConfig LIKE "%RTE.%' . $deprecatedRteProperty . '%"';
+               }
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, $where);
+
+               $dbQueries[] = str_replace(chr(10), ' ', $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+
+               if ($GLOBALS['TYPO3_DB']->sql_error()) {
+                       $customMessages = 'SQL-ERROR: ' . htmlspecialchars($GLOBALS['TYPO3_DB']->sql_error());
+               }
+
+               $pages = array();
+               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $pages[] = $row;
+               }
+               return $pages;
+       }
+
+       /**
+        * Gets the pages with updated deprecated RTE properties in TSConfig column
+        *
+        * @param       array           $pages: reference to pages with deprecated property
+        * @return      array           uid and inclusion string for the pages with deprecated RTE properties in TSConfig column
+        */
+       protected function findUpdateablePagesWithDeprecatedRteProperties(&$pages) {
+               foreach ($pages as $index => $page) {
+                       $deprecatedProperties = explode(',', '/' . implode('/,/((RTE\.(default\.|config\.[a-zA-Z0-9_\-]*\.[a-zA-Z0-9_\-]*\.))|\s)', array_keys($this->replacementRteProperties)) . '/');        
+                       $replacementProperties = explode(',', '$1' . implode(',$1', array_values($this->replacementRteProperties)));
+                       $updatedPageTSConfig = preg_replace($deprecatedProperties, $replacementProperties, $page['TSconfig']);
+                       if ($updatedPageTSConfig == $page['TSconfig']) {
+                               unset($pages[$index]);
+                       } else {
+                               $pages[$index]['TSconfig'] = $updatedPageTSConfig;
+                       }
+               }
+               return $pages;
+       }
+
+       /**
+        * updates the pages records with updateable Page TS Config properties
+        *
+        * @param       array           pages records to update, fetched by getTemplates() and filtered by
+        * @param       array           pointer where to insert all DB queries made, so they can be shown to the user if wanted
+        * @param       string          pointer to output custom messages
+        */
+       protected function updatePages($pages, &$dbQueries, &$customMessages) {
+               foreach ($pages as $page) {
+                       $table = 'pages';
+                       $where = 'uid =' . $page['uid'];
+                       $field_values = array(
+                               'TSconfig' => $page['TSconfig']
+                       );
+                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, $where, $field_values);
+                       $dbQueries[] = str_replace(chr(10), ' ', $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+                       if ($GLOBALS['TYPO3_DB']->sql_error()) {
+                               $customMessages = 'SQL-ERROR: ' . htmlspecialchars($GLOBALS['TYPO3_DB']->sql_error());
+                       }
+               }
+       }
+}
+?>
\ No newline at end of file
index 9a210f4..d587e1e 100644 (file)
@@ -38,6 +38,7 @@ HTMLArea.BlockStyle = Ext.extend(HTMLArea.Plugin, {
                this.classesUrl = this.editorConfiguration.classesUrl;
                this.pageTSconfiguration = this.editorConfiguration.buttons.blockstyle;
                this.tags = (this.pageTSconfiguration && this.pageTSconfiguration.tags) ? this.pageTSconfiguration.tags : {};
+                       // classesTag is DEPRECATED as of TYPO3 4.6 and will be removed#in TYPO3 4.8
                if (typeof(this.editorConfiguration.classesTag) !== "undefined") {
                        if (this.editorConfiguration.classesTag.div) {
                                if (!this.tags.div) {
@@ -78,6 +79,7 @@ HTMLArea.BlockStyle = Ext.extend(HTMLArea.Plugin, {
                                }
                        }
                }
+                       // Property this.editorConfiguration.showTagFreeClasses is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
                this.showTagFreeClasses = (this.pageTSconfiguration ? this.pageTSconfiguration.showTagFreeClasses : false) || this.editorConfiguration.showTagFreeClasses;
                this.prefixLabelWithClassName = this.pageTSconfiguration ? this.pageTSconfiguration.prefixLabelWithClassName : false;
                this.postfixLabelWithClassName = this.pageTSconfiguration ? this.pageTSconfiguration.postfixLabelWithClassName : false;
@@ -303,7 +305,8 @@ HTMLArea.BlockStyle = Ext.extend(HTMLArea.Plugin, {
                        }
                        Ext.iterate(allowedClasses, function (cssClass, value) {
                                var style = null;
-                               if (!this.editor.config.disablePCexamples) {
+                                       // this.editor.config.disablePCexamples is deprecated as of TYPO3 4.6 and will be removed in TYPO 4.8
+                               if (!this.pageTSconfiguration.disableStyleOnOptionLabel && !this.editor.config.disablePCexamples) {
                                        if (HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) {
                                                style = HTMLArea.classesValues[cssClass];
                                        } else if (/-[0-9]+$/.test(cssClass) && HTMLArea.classesValues[RegExp.leftContext + '-'])  {
index f37c51e..2dccbbb 100644 (file)
@@ -39,6 +39,7 @@ HTMLArea.TextStyle = Ext.extend(HTMLArea.Plugin, {
                this.classesUrl = this.editorConfiguration.classesUrl;
                this.pageTSconfiguration = this.editorConfiguration.buttons.textstyle;
                this.tags = (this.pageTSconfiguration && this.pageTSconfiguration.tags) ? this.pageTSconfiguration.tags : {};
+                       // classesTag is DEPRECATED as of TYPO3 4.6 and will be removed#in TYPO3 4.8
                if (typeof(this.editorConfiguration.classesTag) !== "undefined") {
                        if (this.editorConfiguration.classesTag.span) {
                                if (!this.tags.span) {
@@ -63,6 +64,7 @@ HTMLArea.TextStyle = Ext.extend(HTMLArea.Plugin, {
                                }
                        }
                }
+                       // Property this.editorConfiguration.showTagFreeClasses is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
                this.showTagFreeClasses = (this.pageTSconfiguration ? this.pageTSconfiguration.showTagFreeClasses : false) || this.editorConfiguration.showTagFreeClasses;
                this.prefixLabelWithClassName = this.pageTSconfiguration ? this.pageTSconfiguration.prefixLabelWithClassName : false;
                this.postfixLabelWithClassName = this.pageTSconfiguration ? this.pageTSconfiguration.postfixLabelWithClassName : false;
@@ -342,7 +344,8 @@ HTMLArea.TextStyle = Ext.extend(HTMLArea.Plugin, {
                                store.add(new store.recordType({
                                        text: value,
                                        value: cssClass,
-                                       style: (!this.editor.config.disablePCexamples && HTMLArea.classesValues && HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) ? HTMLArea.classesValues[cssClass] : null
+                                               // this.editor.config.disablePCexamples is deprecated as of TYPO3 4.6 and will be removed in TYPO 4.8
+                                       style: (!(this.pageTSconfiguration && this.pageTSconfiguration.disableStyleOnOptionLabel) && !this.editor.config.disablePCexamples && HTMLArea.classesValues && HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) ? HTMLArea.classesValues[cssClass] : null
                                }));
                        }, this);
                }
index 8bea6ee..f8da792 100644 (file)
@@ -23,6 +23,7 @@
                        <label index="rteHeight">Height of the RTE in pixels</label>
                        <label index="rteResize">Make RTE resizable</label>
                        <label index="rteMaxHeight">Maximal height of resizable RTE in pixels</label>
+                       <label index="deprecatedPropertyMessage">Page TSConfig property "%1$s" used on page id #%4$s is DEPRECATED and will be removed in TYPO3 %3$s. Use "%2$s" instead.</label>
                </languageKey>
        </data>
        <orig_hash type="array">
index 14813b9..b8b43c4 100644 (file)
@@ -211,6 +211,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
        public $classesAnchorClassTitle = array();
        public $classesAnchorDefaultTarget = array();
        public $classesAnchorJSOptions = array();
+       protected $defaultLinkTarget;
 
        public $allowedItems;
 
@@ -372,13 +373,16 @@ class tx_rtehtmlarea_browse_links extends browse_links {
 
                        // Processing the classes configuration
                $classSelected = array();
-               if ($this->thisConfig['classesAnchor'] || $this->thisConfig['classesLinks']) {
+                       // $this->thisConfig['classesAnchor'], $this->thisConfig['classesLinks'] and $this->thisConfig['classesAnchor.'] are deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               if ($this->buttonConfig['properties.']['class.']['allowedClasses'] || $this->thisConfig['classesAnchor'] || $this->thisConfig['classesLinks']) {
                        $this->setClass = $this->curUrlArray['class'];
-                       if ($this->thisConfig['classesAnchor']) {
-                               $classesAnchorArray = t3lib_div::trimExplode(',',$this->thisConfig['classesAnchor'], 1);
-                       } else {
-                               $classesAnchorArray = t3lib_div::trimExplode(',',$this->thisConfig['classesLinks'], 1);
+                       $classesAnchorArray = t3lib_div::trimExplode(',', $this->buttonConfig['properties.']['class.']['allowedClasses'], 1);
+                       $classesAnchorArray = array_merge($classesAnchorArray, t3lib_div::trimExplode(',', $this->thisConfig['classesAnchor'], 1));
+                       if (!count($classesAnchorArray) && $this->thisConfig['classesLinks']) {
+                               $classesAnchorArray = t3lib_div::trimExplode(',', $this->thisConfig['classesLinks'], 1);
                        }
+                       $classesAnchorConfigArray = array();
+                       
                                // Collecting allowed classes and configured default values
                        $classesAnchor = array();
                        $classesAnchor['all'] = array();
@@ -389,7 +393,12 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                                $classesAnchor['all'][] = $conf['class'];
                                                if (in_array($conf['type'], $this->anchorTypes)) {
                                                        $classesAnchor[$conf['type']][] = $conf['class'];
-                                                       if (is_array($this->thisConfig['classesAnchor.']) && is_array($this->thisConfig['classesAnchor.']['default.']) && $this->thisConfig['classesAnchor.']['default.'][$conf['type']] == $conf['class']) {
+                                                       if (($this->buttonConfig[$conf['type']. '.']['properties.']['class.']['default'] == $conf['class'])
+                                                               || (!isset($this->buttonConfig[$conf['type']. '.']['properties.']['class.']['default'])
+                                                                       && $this->thisConfig['classesAnchor.']['default.'][$conf['type']] == $conf['class'])
+                                                               || (!isset($this->buttonConfig[$conf['type']. '.']['properties.']['class.']['default'])
+                                                                       && !isset($this->thisConfig['classesAnchor.']['default.'][$conf['type']])
+                                                                       && $this->buttonConfig['properties.']['class.']['default'] == $conf['class'])) {
                                                                $this->classesAnchorDefault[$conf['type']] = $conf['class'];
                                                                if ($conf['titleText']) {
                                                                        $this->classesAnchorDefaultTitle[$conf['type']] = $this->getLLContent(trim($conf['titleText']));
@@ -429,14 +438,20 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                        // Initializing the target value
                        // Unset the target if it is set to a value different than default and if no class is selected and the target field is not displayed
                        // In other words, do not forward the target if we changed tab and the target field is not displayed
-               $this->setTarget = (isset($this->curUrlArray['target'])
-                               && !(
-                                       ($this->curUrlArray['target'] != $this->thisConfig['defaultLinkTarget'])
-                                       && !$classSelected[$this->act]
-                                       && is_array($this->buttonConfig['targetSelector.']) && $this->buttonConfig['targetSelector.']['disabled'] && is_array($this->buttonConfig['popupSelector.']) && $this->buttonConfig['popupSelector.']['disabled'])
-                               ) ? $this->curUrlArray['target'] : '';
-               if ($this->thisConfig['defaultLinkTarget'] && !isset($this->curUrlArray['target']))     {
-                       $this->setTarget=$this->thisConfig['defaultLinkTarget'];
+                       // Property $this->thisConfig['defaultLinkTarget'] is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               $this->defaultLinkTarget = isset($this->buttonConfig['properties.']['target.']['default']) ? $this->buttonConfig['properties.']['target.']['default'] : (isset($this->thisConfig['defaultLinkTarget']) ? $this->thisConfig['defaultLinkTarget'] : '');
+               $this->setTarget = '';
+               if (isset($this->curUrlArray['target']) && !(
+                               $this->curUrlArray['target'] != $this->defaultLinkTarget
+                               && !$classSelected[$this->act]
+                               && is_array($this->buttonConfig['targetSelector.']) && $this->buttonConfig['targetSelector.']['disabled'] 
+                               && is_array($this->buttonConfig['popupSelector.']) && $this->buttonConfig['popupSelector.']['disabled']
+                               )
+                       ) {
+                       $this->setTarget = $this->curUrlArray['target'];
+               }
+               if ($this->defaultLinkTarget && !isset($this->curUrlArray['target'])) {
+                       $this->setTarget = $this->defaultLinkTarget;
                }
                        // Initializing additional attributes
                if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['additionalAttributes']) {
@@ -600,7 +615,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                        // Starting content:
                $content=$this->doc->startPage($LANG->getLL('Insert/Modify Link',1));
 
-                       // Initializing the action value, possibly removing blinded values etc:
+                       // Initializing the action value, possibly adding/removing values
                $this->allowedItems = explode(',','page,file,url,mail,spec');
 
                        // Calling hook for extra options
@@ -611,6 +626,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                if (is_array($this->buttonConfig['options.']) && $this->buttonConfig['options.']['removeItems']) {
                        $this->allowedItems = array_diff($this->allowedItems,t3lib_div::trimExplode(',',$this->buttonConfig['options.']['removeItems'],1));
                } else {
+                               // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
                        $this->allowedItems = array_diff($this->allowedItems,t3lib_div::trimExplode(',',$this->thisConfig['blindLinkOptions'],1));
                }
                reset($this->allowedItems);
@@ -1051,7 +1067,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                                                                browse_links_setTarget(anchorClass[\'target\']);
                                                                        } else if (document.ltargetform.ltarget && document.getElementById(\'ltargetrow\').style.display == \'none\') {
                                                                                        // Reset target to default if field is not displayed and class has no configured target
-                                                                               document.ltargetform.ltarget.value = \''. ($this->thisConfig['defaultLinkTarget']?$this->thisConfig['defaultLinkTarget']:'') .'\';
+                                                                               document.ltargetform.ltarget.value = \''. ($this->defaultLinkTarget ? $this->defaultLinkTarget : '') .'\';
                                                                                browse_links_setTarget(document.ltargetform.ltarget.value);
                                                                        }
                                                                        break;
index 752cdaf..27b42fb 100644 (file)
@@ -437,7 +437,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                $removedProperties = t3lib_div::trimExplode(',',$this->buttonConfig['properties.']['removeItems'],1);
                        }
                }
-
+                       // The following property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
                if ($this->thisConfig['classesImage']) {
                        $classesImageArray = t3lib_div::trimExplode(',', $this->thisConfig['classesImage'], 1);
                        $classesImageJSOptions = '<option value=""></option>';
@@ -445,7 +445,13 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                $classesImageJSOptions .= '<option value="' .$class . '">' . $class . '</option>';
                        }
                }
-
+               if ($this->buttonConfig['properties.']['class.']['allowedClasses']) {
+                       $classesImageArray = t3lib_div::trimExplode(',', $this->buttonConfig['properties.']['class.']['allowedClasses'], 1);
+                       $classesImageJSOptions = '<option value=""></option>';
+                       foreach ($classesImageArray as $class) {
+                               $classesImageJSOptions .= '<option value="' .$class . '">' . $class . '</option>';
+                       }
+               }
                $lockPlainWidth = 'false';
                $lockPlainHeight = 'false';
                if (is_array($this->thisConfig['proc.']) && $this->thisConfig['proc.']['plainImageMode']) {
@@ -493,7 +499,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                }
                        }
                        function printCurrentImageOptions() {
-                               var classesImage = ' . ($this->thisConfig['classesImage']?'true':'false') . ';
+                               var classesImage = ' . (($this->buttonConfig['properties.']['class.']['allowedClasses'] || $this->thisConfig['classesImage']) ? 'true' : 'false') . ';
                                if (classesImage) var styleSelector=\'<select id="iClass" name="iClass" style="width:140px;">' . $classesImageJSOptions  . '</select>\';
                                var floatSelector=\'<select id="iFloat" name="iFloat"><option value="">' . $LANG->getLL('notSet') . '</option><option value="none">' . $LANG->getLL('nonFloating') . '</option><option value="left">' . $LANG->getLL('left') . '</option><option value="right">' . $LANG->getLL('right') . '</option></select>\';
                                if (plugin.getButton("Language")) {
@@ -545,7 +551,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                return sz;
                        }
                        function setImageProperties() {
-                               var classesImage = ' . ($this->thisConfig['classesImage']?'true':'false') . ';
+                               var classesImage = ' . (($this->buttonConfig['properties.']['class.']['allowedClasses'] || $this->thisConfig['classesImage']) ? 'true' : 'false') . ';
                                if (selectedImageRef)   {
                                        if (document.imageData.iWidth) {
                                                if (document.imageData.iWidth.value && parseInt(document.imageData.iWidth.value)) {
@@ -648,7 +654,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                return false;
                        }
                        function insertImagePropertiesInForm()  {
-                               var classesImage = ' . ($this->thisConfig['classesImage']?'true':'false') . ';
+                               var classesImage = ' . (($this->buttonConfig['properties.']['class.']['allowedClasses'] || $this->thisConfig['classesImage']) ? 'true' : 'false') . ';
                                if (selectedImageRef)   {
                                        var styleWidth, styleHeight, padding;
                                        if (document.imageData.iWidth) {
@@ -1171,6 +1177,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                if (is_array($this->buttonConfig['options.']) && $this->buttonConfig['options.']['removeItems']) {
                        $allowedItems = array_diff($allowedItems, t3lib_div::trimExplode(',', $this->buttonConfig['options.']['removeItems'], 1));
                } else {
+                               // This PageTSConfig property is deprecated as of TYPO3 4.6 and will be removed in TYPO3 4.8
                        $allowedItems = array_diff($allowedItems, t3lib_div::trimExplode(',', $this->thisConfig['blindImageOptions'], 1));
                }
                return $allowedItems;
index d9ad316..1279f4e 100644 (file)
@@ -3,7 +3,7 @@
 #
 # ***************************************************************************************
 
-       ## Anchor classes configuration for use by the anchor accessibility feature (htmlArea RTE only)
+       ## Anchor classes configuration for use by the anchor accessibility feature
        ## Add inline icons to the links
 RTE.classesAnchor {
        externalLink {
index 64e8528..78b97db 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Sets default Page TSConfig with minimal features for advanced users.
 #
-# @author      Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+# @author      Stanislas Rolland <typo3(arobas)sjbr.ca>
 # ***************************************************************************************
 
 RTE.default {
@@ -14,6 +14,6 @@ RTE.default {
 
 }
 
-       ## front end RTE configuration for the general public (htmlArea RTE only)
+       ## front end RTE configuration for the general public
 RTE.default.FE < RTE.default
 RTE.default.FE.FE >
index 6e29d2a..7adb702 100644 (file)
@@ -57,7 +57,7 @@ RTE.classes {
        }
 }
 
-       ## Anchor classes configuration for use by the anchor accesibility feature (htmlArea RTE only)
+       ## Anchor classes configuration for use by the anchor accesibility feature
 RTE.classesAnchor {
        externalLink {
                class = external-link
@@ -106,7 +106,7 @@ RTE.classesAnchor {
        ## Default RTE configuration
 RTE.default {
 
-               ## Markup options (htmlArea RTE only)
+               ## Markup options
        enableWordClean = 1
        removeTrailingBR = 1
        removeComments = 1
@@ -125,56 +125,14 @@ RTE.default {
                ## Toolbar options
        showButtons = *
 
-               ## More toolbar options (htmlArea RTE only)
+               ## More toolbar options
        keepButtonGroupTogether = 1
 
-               ## Enable status bar (htmlArea RTE only)
+               ## Enable status bar
        showStatusBar =  1
 
-               ## Add default example styles
-               ## Left, center, right and justify alignment of text in block elements
-       inlineStyle.text-alignment (
-               p.align-left, h1.align-left, h2.align-left, h3.align-left, h4.align-left, h5.align-left, h6.align-left, div.align-left, address.align-left { text-align: left; }
-               p.align-center, h1.align-center, h2.align-center, h3.align-center, h4.align-center, h5.align-center, h6.align-center, div.align-center, address.align-center { text-align: center; }
-               p.align-right, h1.align-right, h2.align-right, h3.align-right, h4.align-right, h5.align-right, h6.align-right, div.align-right, address.align-right { text-align: right; }
-               p.align-justify, h1.align-justify, h2.align-justify, h3.align-justify, h4.align-justify, h5.align-justify, h6.align-justify, div.align-justify, address.align-justify { text-align: justify; }
-       )
-               ## Two frame examples taken from the example CSS file of CSS Styled Content extension and applied to p and table block elements.
-       inlineStyle.frames (
-               p.csc-frame-frame1, table.csc-frame-frame1 { background-color: #EDEBF1; padding: 2px 4px 2px 4px; border: 1px solid #333333; }
-               p.csc-frame-frame2, table.csc-frame-frame2 { background-color: #F5FFAA; padding: 2px 4px 2px 4px; border: 1px solid #333333; }
-       )
-               ## Bullet styles for unordered lists.
-       inlineStyle.ul (
-               ul.component-items { color: #186900; list-style-type: circle; }
-               ul.action-items { color: #8A0020; list-style-image: url(img/red_arrow_bullet.gif); }
-       )
-               ## Numbering styles for ordered lists.
-       inlineStyle.ol (
-               ol.component-items-ordered { color: #10007B; list-style-type: lower-roman; }
-               ol.action-items-ordered { color: #8A0020; list-style-type: lower-greek; }
-       )
-               ## Three inline text colors taken from the color scheme of CSS Styled Content extension.
-       inlineStyle.inline-text (
-               span.important { color: #8A0020; }
-               span.name-of-person { color: #10007B; }
-               span.detail { color: #186900; }
-       )
-               ## Default selectors for the default configuration of the link accessibity feature.
-       inlineStyle.accessibility (
-               a.external-link {}
-               a.external-link-new-window {}
-               a.internal-link {}
-               a.internal-link-new-window {}
-               a.download {}
-               a.mail {}
-       )
-               ## Default selector for indentation.
-       inlineStyle.indentation (
-               div.indent { margin-left: 2em; }
-       )
-
-               ## Use stylesheet file rather than the above mainStyleOverride and inlineStyle properties to style the contents (htmlArea RTE only)
+               ## Property ignoreMainStyleOverride is DEPRECATED as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               ## Use stylesheet file rather than mainStyleOverride and inlineStyle properties to style the contents
                ## When RTE.default.contentCSS is not specified, file EXT:rtehtmlarea/res/contentcsss/default.css is used.
        ignoreMainStyleOverride = 1
 
@@ -192,50 +150,46 @@ RTE.default {
                indent
        )
 
-               ## classesParagraph, classesTable, classesTD, classesLinks, classesCharacter
-               ## Classic RTE: Specify the list of class selectors that should be presented in the RTE interface:
-               ## htmlArea RTE: Restrict the list of class selectors presented by the RTE to the following:
-       classesParagraph (
+               ## Restrict the list of class selectors presented by the RTE to the following for the specified tags:
+       buttons.blockstyle.tags.div.allowedClasses (
                align-left, align-center, align-right,
                csc-frame-frame1, csc-frame-frame2
        )
-       classesTable = csc-frame-frame1, csc-frame-frame2
-       classesTD = align-left, align-center, align-right
-       classesLinks = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
-       classesCharacter = important, name-of-person, detail
-
-               ## Configuration of the anchor accessibility feature (htmlArea RTE only)
-               ## These classes should also be in the list of allowedClasses.
-       classesAnchor = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
-       classesAnchor.default {
-               page = internal-link
-               url = external-link-new-window
-               file = download
-               mail = mail
-       }
-
-               ## Show all applicable class selectors available in the style sheet file (htmlArea RTE only)
-       showTagFreeClasses = 1
-
-               ## Configuration specific to the table button or TableOperations feature (htmlArea RTE only)
+       buttons.blockstyle.tags.table.allowedClasses = csc-frame-frame1, csc-frame-frame2
+       buttons.blockstyle.tags.td.allowedClasses = align-left, align-center, align-right
+       buttons.textstyle.tags.span.allowedClasses = important, name-of-person, detail
+
+               ## Configuration of links
+               ## These classes should also be in the list proc.allowedClasses
+       buttons.link.properties.class.allowedClasses = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
+       buttons.link.page.properties.class.default = internal-link
+       buttons.link.url.properties.class.default = external-link-new-window
+       buttons.link.file.properties.class.default = download
+       buttons.link.mail.properties.class.default = mail
+
+               ## Show all applicable class selectors available in the style sheet file
+       buttons.blockstyle.showTagFreeClasses = 1
+       buttons.textstyle.showTagFreeClasses = 1
+
+               ## Configuration specific to the table button or TableOperations feature
                ## Use the context menu instead of the toolbar for table operations, but keep toggleborders button in toolbar
                ## Show borders on table creation
        hideTableOperationsInToolbar = 1
        buttons.toggleborders.keepInToolbar = 1
        buttons.toggleborders.setOnTableCreation = 1
 
-               ## Configuration specific to the inserttag button or QuickTag feature (htmlArea RTE only)
+               ## Configuration specific to the inserttag button or QuickTag feature
                ## Do not allow insertion of the following tags
        buttons.inserttag.denyTags = font, u, strike, table
 
-               ## Configuration specific to the bold and italic buttons (htmlArea RTE only)
+               ## Configuration specific to the bold and italic buttons
                ## Add hotkeys associated with bold, italic, strikethrough and underline buttons
        buttons.bold.hotKey = b
        buttons.italic.hotKey = i
        buttons.strikethrough.hotKey = s
        buttons.underline.hotkey = u
 
-               ## Configuration specific to the spellcheck button or SpellCheck feature (htmlArea RTE only)
+               ## Configuration specific to the spellcheck button or SpellCheck feature
                ## Enable the use of personal dictionaries
        buttons.spellcheck.enablePersonalDictionaries = 1
 }
@@ -243,7 +197,7 @@ RTE.default {
        ## Use same processing as on entry to database to clean content pasted into the editor
 RTE.default.enableWordClean.HTMLparser < RTE.default.proc.entryHTMLparser_db
 
-       ## front end RTE configuration (htmlArea RTE only)
+       ## front end RTE configuration
 RTE.default.FE < RTE.default
 RTE.default.FE.FE >
 RTE.default.FE.userElements >
index 7b06268..a155f5d 100644 (file)
@@ -1,7 +1,7 @@
 # ***************************************************************************************
 # Compatibility configuration for indentation and alignment
 #
-# @author      Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+# @author      Stanislas Rolland <typo3(arobas)sjbr.ca>
 # ***************************************************************************************
 
        ## Default RTE configuration
index 672734e..8d801b1 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Sets Page TSConfig with most commonly used features representing a good start for typical sites.
 #
-# @author      Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+# @author      Stanislas Rolland <typo3(arobas)sjbr.ca>
 # ***************************************************************************************
 
        ## Define labels and styles to be applied to class selectors in the interface of the RTE
@@ -59,7 +59,7 @@ RTE.classes {
        }
 }
 
-       ## Anchor classes configuration for use by the anchor accesibility feature (htmlArea RTE only)
+       ## Anchor classes configuration for use by the anchor accesibility feature
 RTE.classesAnchor {
        externalLink {
                class = external-link
@@ -96,7 +96,7 @@ RTE.classesAnchor {
        ## Default RTE configuration
 RTE.default {
 
-               ## Markup options (htmlArea RTE only)
+               ## Markup options
        enableWordClean = 1
        removeTrailingBR = 1
        removeComments = 1
@@ -105,14 +105,8 @@ RTE.default {
 
                ## Toolbar options
                ## The TCA configuration may add buttons to the toolbar
-               ## The following buttons are specific to Classic RTE: class
-               ## The following buttons are specific to htmlArea RTE: blockstylelabel, blockstyle, textstylelabel, textstyle,
-               ##              insertcharacter, findreplace, removeformat, toggleborders, tableproperties,
-               ##              rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit,
-               ##              columninsertbefore, columninsertafter, columndelete, columnsplit,
-               ##              cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
        showButtons (
-               class, blockstylelabel, blockstyle, textstylelabel, textstyle,
+               blockstylelabel, blockstyle, textstylelabel, textstyle,
                formatblock, bold, italic, subscript, superscript,
                orderedlist, unorderedlist, outdent, indent, textindicator,
                insertcharacter, link, table, findreplace, chMode, removeformat, undo, redo, about,
@@ -122,59 +116,17 @@ RTE.default {
                cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
        )
 
-               ## More toolbar options (htmlArea RTE only)
+               ## More toolbar options
        keepButtonGroupTogether = 1
 
-               ## Enable status bar (htmlArea RTE only)
+               ## Enable status bar
        showStatusBar =  1
 
-               ## Hide infrequently used paragraph types in the paragraph type selector (formatblock button)
-       hidePStyleItems = pre,address
+               ## Hide infrequently used block types in the block formatting selector
+       buttons.formatblock.removeItems = pre,address
 
-               ## Add default example styles
-               ## Left, center, right and justify alignment of text in block elements
-       inlineStyle.text-alignment (
-               p.align-left, h1.align-left, h2.align-left, h3.align-left, h4.align-left, h5.align-left, h6.align-left, div.align-left, address.align-left { text-align: left; }
-               p.align-center, h1.align-center, h2.align-center, h3.align-center, h4.align-center, h5.align-center, h6.align-center, div.align-center, address.align-center { text-align: center; }
-               p.align-right, h1.align-right, h2.align-right, h3.align-right, h4.align-right, h5.align-right, h6.align-right, div.align-right, address.align-right { text-align: right; }
-               p.align-justify, h1.align-justify, h2.align-justify, h3.align-justify, h4.align-justify, h5.align-justify, h6.align-justify, div.align-justify, address.align-justify { text-align: justify; }
-       )
-               ## Two frame examples taken from the example CSS file of CSS Styled Content extension and applied to p and table block elements.
-       inlineStyle.frames (
-               p.csc-frame-frame1, table.csc-frame-frame1 { background-color: #EDEBF1; padding: 2px 4px 2px 4px; border: 1px solid #333333; }
-               p.csc-frame-frame2, table.csc-frame-frame2 { background-color: #F5FFAA; padding: 2px 4px 2px 4px; border: 1px solid #333333; }
-       )
-               ## Bullet styles for unordered lists.
-       inlineStyle.ul (
-               ul.component-items { color: #186900; list-style-type: circle; }
-               ul.action-items { color: #8A0020; list-style-image: url(img/red_arrow_bullet.gif); }
-       )
-               ## Numbering styles for ordered lists.
-       inlineStyle.ol (
-               ol.component-items-ordered { color: #10007B; list-style-type: lower-roman; }
-               ol.action-items-ordered { color: #8A0020; list-style-type: lower-greek; }
-       )
-               ## Three inline text colors taken from the color scheme of CSS Styled Content extension.
-       inlineStyle.inline-text (
-               span.important { color: #8A0020; }
-               span.name-of-person { color: #10007B; }
-               span.detail { color: #186900; }
-       )
-               ## Default selectors for the default configuration of the link accessibity feature.
-       inlineStyle.accessibility (
-               a.external-link {}
-               a.external-link-new-window {}
-               a.internal-link {}
-               a.internal-link-new-window {}
-               a.download {}
-               a.mail {}
-       )
-               ## Default selector for indentation.
-       inlineStyle.indentation (
-               div.indent { margin-left: 2em; }
-       )
-
-               ## Use stylesheet file rather than the above mainStyleOverride and inlineStyle properties to style the contents (htmlArea RTE only).
+               ## Property ignoreMainStyleOverride is DEPRECATED as of TYPO3 4.6 and will be removed in TYPO3 4.8
+               ## Use stylesheet file rather than mainStyleOverride and inlineStyle properties to style the contents.
                ## When RTE.default.contentCSS is not specified, file EXT:rtehtmlarea/res/contentcsss/default.css is used.
        ignoreMainStyleOverride = 1
 
@@ -189,29 +141,24 @@ RTE.default {
                indent
        )
 
-               ## classesParagraph, classesTable, classesTD, classesLinks, classesCharacter
-               ## Classic RTE: Specify the list of class selectors that should be presented in the RTE interface:
-               ## htmlArea RTE: Restrict the list of class selectors presented by the RTE to the following:
-       classesParagraph (
+               ## Restrict the list of class selectors presented by the RTE to the following for the specified tags:
+       buttons.blockstyle.tags.div.allowedClasses (
                align-left, align-center, align-right,
                csc-frame-frame1, csc-frame-frame2
        )
-       classesTable = csc-frame-frame1, csc-frame-frame2
-       classesTD = align-left, align-center, align-right
-       classesLinks = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
-       classesCharacter = important, name-of-person, detail
-
-               ## Configuration of the anchor accessibility feature (htmlArea RTE only)
-               ## These classes should also be in the list of allowedClasses.
-       classesAnchor = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
-       classesAnchor.default {
-               page = internal-link
-               url = external-link-new-window
-               file = download
-               mail = mail
-       }
-
-               ## Configuration specific to the TableOperations feature (htmlArea RTE only)
+       buttons.blockstyle.tags.table.allowedClasses = csc-frame-frame1, csc-frame-frame2
+       buttons.blockstyle.tags.td.allowedClasses = align-left, align-center, align-right
+       buttons.textstyle.tags.span.allowedClasses = important, name-of-person, detail
+
+               ## Configuration of links
+               ## These classes should also be in the list proc.allowedClasses
+       buttons.link.properties.class.allowedClasses = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
+       buttons.link.page.properties.class.default = internal-link
+       buttons.link.url.properties.class.default = external-link-new-window
+       buttons.link.file.properties.class.default = download
+       buttons.link.mail.properties.class.default = mail
+
+               ## Configuration specific to the TableOperations feature
                ## Remove the following fieldsets from the table operations dialogs
        disableAlignmentFieldsetInTableOperations = 1
        disableSpacingFieldsetInTableOperations = 1
@@ -221,13 +168,13 @@ RTE.default {
                ## Show borders on table creation
        buttons.toggleborders.setOnTableCreation = 1
 
-               ## Configuration specific to the bold and italic buttons (htmlArea RTE only)
+               ## Configuration specific to the bold and italic buttons
                ## Add hotkeys associated with bold and italic buttons
        buttons.bold.hotKey = b
        buttons.italic.hotKey = i
 }
 
-       ## front end RTE configuration for the general public (htmlArea RTE only)
+       ## front end RTE configuration for the general public
 RTE.default.FE < RTE.default
 RTE.default.FE.showStatusBar = 0
 RTE.default.FE.hideButtons = chMode, blockstyle, textstyle, underline, strikethrough, subscript, superscript, lefttoright, righttoleft, left, center, right, justifyfull, table, inserttag, findreplace, removeformat, copy, cut, paste