Added feature #7875: Coloured text is created using font-tag instead of span in IE
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 8 Oct 2008 23:50:23 +0000 (23:50 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 8 Oct 2008 23:50:23 +0000 (23:50 +0000)
Added feature #8847: Custom colors in TYPO3Color like old SelectColor extension

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

12 files changed:
ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/doc/manual.sxw
typo3/sysext/rtehtmlarea/ext_conf_template.txt
typo3/sysext/rtehtmlarea/ext_localconf.php
typo3/sysext/rtehtmlarea/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultColor/default-color.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js
typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css
typo3/sysext/rtehtmlarea/res/style/pageTSConfig.txt [new file with mode: 0644]
typo3/sysext/t3skin/rtehtmlarea/htmlarea.css

index 3603001..2e63a31 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * Fixed bug #9516: htmlARea RTE: Move link tags to head
        * Added feature #9521: htmlArea RTE: factor out some functions dealing with inline elements
+       * Added feature #7875: Coloured text is created using font-tag instead of span in IE
+       * Added feature #8847: Custom colors in TYPO3Color like old SelectColor extension
 
 2008-10-05  Stanislas Rolland  <typo3@sjbr.ca>
 
index 3372578..36ed893 100644 (file)
@@ -2,6 +2,8 @@
 
        * Fixed bug #9516: htmlARea RTE: Move link tags to head
        * Added feature #9521: htmlArea RTE: factor out some functions dealing with inline elements
+       * Added feature #7875: Coloured text is created using font-tag instead of span in IE
+       * Added feature #8847: Custom colors in TYPO3Color like old SelectColor extension
 
 2008-10-05  Stanislas Rolland  <typo3@sjbr.ca>
 
index c38ba02..93be995 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/doc/manual.sxw and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
index 85cb200..13ff09d 100644 (file)
@@ -19,12 +19,15 @@ dictionaryList  = en
   # cat=basic/enable/100; type=options[Minimal (Most features disabled. Administrator needs to enable them using TypoScript. For advanced administrators only.),Typical (Most commonly used features are enabled. Select this option if you are unsure which one to use.),Demo (Show-off configuration. Includes pre-configured styles. Not for production environments.)]; label=Default configuration settings
 defaultConfiguration = Typical (Most commonly used features are enabled. Select this option if you are unsure which one to use.)
 
-  # cat=basic/enable/110; type=boolean; label=Enable images in the RTE: If set, the use of images will be enabled in the default configuration of the RTE.
+  # cat=basic/enable/110; type=boolean; label=Enable images in the RTE: If set, the use of images will be enabled.
 enableImages = 0
 
-  # cat=basic/enable/115; type=boolean; label=Enable additional inline elements: If set, the potential use of additional inline elements will be enabled in the default configuration of the RTE.
+  # cat=basic/enable/115; type=boolean; label=Enable additional inline elements: If set, the potential use of additional inline elements will be enabled.
 enableInlineElements = 0
 
+  # cat=basic/enable/117; type=boolean; label=Enable features that use the style attribute: If set, the potential use of features that use the style attribute (color) will be enabled.
+allowStyleAttribute = 1
+
   # cat=basic/enable/140; type=boolean; label=Enable links accessibility icons: If set, accessibility icons will be added in front of links.
 enableAccessibilityIcons = 0
 
index e5f47cd..86d7f15 100644 (file)
@@ -36,129 +36,20 @@ if (!defined ("TYPO3_MODE"))       die ('Access denied.');
 
 if(!$TYPO3_CONF_VARS['BE']['RTEenabled'])  $TYPO3_CONF_VARS['BE']['RTEenabled'] = 1;
 
-// Registering the RTE object
+       // Registering the RTE object
 $TYPO3_CONF_VARS['BE']['RTE_reg'][$_EXTKEY] = array('objRef' => 'EXT:'.$_EXTKEY.'/class.tx_rtehtmlarea_base.php:&tx_rtehtmlarea_base');
 
-// Make the extension version number available to the extension scripts
+       // Make the extension version number available to the extension scripts
 require_once(t3lib_extMgm::extPath($_EXTKEY) . 'ext_emconf.php');
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['version'] = $EM_CONF[$_EXTKEY]['version'];
 
-// Set compatibility warnings in the Update Wizard of the Install Tool
-$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['tx_rtehtmlarea_indent'] = array(
-       'title' => 'htmlArea RTE: Using CSS classes for indentation and alignment',
-       'version' => 4002000,
-       'description' => '<ul>
-                               <li><b>Indentation is produced by a CSS class instead of the blockquote element.</b><br />You will need to specify in Page TSConfig the class to be used for indentation using property buttons.indent.useClass (default is "indent"). You will need to define this class in your stylesheets and ensure that it is allowed by the RTE transformation (RTE.default.proc). Alternatively, you may continue using the blockquote element by setting property buttons.indent.useBlockquote. You may also want to add the new blockquote button to the RTE toolbar.</li>
-                               <li><b>Text alignment is produced by CSS classes instead of deprecated align attribute.</b><br />You will need to specify in Page TSConfig the class to be used for each text alignment button using property buttons.[<i>left, center, right or justifyfull</i>].useClass (defaults are "align-left", "align-center", "align-right", "align-justify"). You will need to define these classes in your stylesheets, and ensure that they are allowed by the RTE transformation (RTE.default.proc). Alternatively, you may continue using deprecated align attribute by setting property buttons.[<i>left, center, right or justifyfull</i>].useAlignAttribute.</li>
-                       </ul>'
-);
+       // Unserializing the configuration so we can use it here
+$_EXTCONF = unserialize($_EXTCONF);
 
-// Initialize plugin registration array
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins'] = array();
-
-// Registering plugin from "inner" extensions:
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultInline'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultInline']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultInline/class.tx_rtehtmlarea_defaultinline.php:&tx_rtehtmlarea_defaultinline';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultInline']['addIconsToSkin'] = 1;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['BlockElements'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['BlockElements']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php:&tx_rtehtmlarea_blockelements';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['BlockElements']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefinitionList'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefinitionList']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefinitionList/class.tx_rtehtmlarea_definitionlist.php:&tx_rtehtmlarea_definitionlist';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefinitionList']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['BlockStyle'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['BlockStyle']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/BlockStyle/class.tx_rtehtmlarea_blockstyle.php:&tx_rtehtmlarea_blockstyle';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['CharacterMap'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['CharacterMap']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/CharacterMap/class.tx_rtehtmlarea_charactermap.php:&tx_rtehtmlarea_charactermap';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['CharacterMap']['addIconsToSkin'] = 0;
-$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']['TextStyle'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TextStyle']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TextStyle/class.tx_rtehtmlarea_textstyle.php:&tx_rtehtmlarea_textstyle';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultImage'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultImage']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultImage/class.tx_rtehtmlarea_defaultimage.php:&tx_rtehtmlarea_defaultimage';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultImage']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Image'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Image']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3Image/class.tx_rtehtmlarea_typo3image.php:&tx_rtehtmlarea_typo3image';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Image']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Image']['disableInFE'] = 1;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultLink'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultLink']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultLink/class.tx_rtehtmlarea_defaultlink.php:&tx_rtehtmlarea_defaultlink';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['DefaultLink']['addIconsToSkin'] = 0;
-$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;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['SpellChecker']['disableInFE'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['FindReplace'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['FindReplace']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/FindReplace/class.tx_rtehtmlarea_findreplace.php:&tx_rtehtmlarea_findreplace';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['FindReplace']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['FindReplace']['disableInFE'] = 0;
-$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']['TYPO3HtmlParser'] = 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;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['AboutEditor']['disableInFE'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['ContextMenu'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['ContextMenu']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/ContextMenu/class.tx_rtehtmlarea_contextmenu.php:&tx_rtehtmlarea_contextmenu';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['ContextMenu']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['ContextMenu']['disableInFE'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UndoRedo'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UndoRedo']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/UndoRedo/class.tx_rtehtmlarea_undoredo.php:&tx_rtehtmlarea_undoredo';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UndoRedo']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['UndoRedo']['disableInFE'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['CopyPaste'] = array();
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['CopyPaste']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/CopyPaste/class.tx_rtehtmlarea_copypaste.php:&tx_rtehtmlarea_copypaste';
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['CopyPaste']['addIconsToSkin'] = 0;
-$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['plugins']['CopyPaste']['disableInFE'] =  0;
-
-$_EXTCONF = unserialize($_EXTCONF);    // unserializing the configuration so we can use it here:
+       // Add default RTE transformation configuration
+t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/proc/pageTSConfig.txt">');
 
+       // Add default Page TSonfig RTE configuration
 if (strstr($_EXTCONF['defaultConfiguration'],'Minimal')) {
        $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] = 'Advanced';
 } elseif (strstr($_EXTCONF['defaultConfiguration'],'Demo')) {
@@ -166,22 +57,17 @@ if (strstr($_EXTCONF['defaultConfiguration'],'Minimal')) {
 } else {
        $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] = 'Typical';
 }
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages'] = $_EXTCONF['enableImages'] ? $_EXTCONF['enableImages'] : 0;
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDAMBrowser'] = $_EXTCONF['enableDAMBrowser'] ? $_EXTCONF['enableDAMBrowser'] : 0;
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableAccessibilityIcons'] = $_EXTCONF['enableAccessibilityIcons'] ? $_EXTCONF['enableAccessibilityIcons'] : 0;
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableClickEnlarge'] = $_EXTCONF['enableClickEnlarge'] ? $_EXTCONF['enableClickEnlarge'] : 0;
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableMozillaExtension'] = $_EXTCONF['enableMozillaExtension'] ? $_EXTCONF['enableMozillaExtension'] : 0;
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['mozAllowClipboardURL'] = $_EXTCONF['mozAllowClipboardURL'] ? $_EXTCONF['mozAllowClipboardURL'] : 'http://typo3.org/fileadmin/dl/allowclipboard_helper/allowclipboard_helper-0.5.5-fx_mz_zm_deLabelFix.xpi';
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['forceCommandMode'] = $_EXTCONF["forceCommandMode"] ? $_EXTCONF["forceCommandMode"] : 0;
+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
+t3lib_extMgm::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/' . strtolower($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration']) . '/userTSConfig.txt">');
+
+       // Troubleshooting and experimentation
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDebugMode'] = $_EXTCONF['enableDebugMode'] ? $_EXTCONF['enableDebugMode'] : 0;
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableCompressedScripts'] = $_EXTCONF['enableCompressedScripts'] ? $_EXTCONF['enableCompressedScripts'] : 0;
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['dictionaryList'] = $_EXTCONF["dictionaryList"] ? $_EXTCONF["dictionaryList"] : 'en';
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultDictionary'] = $_EXTCONF["defaultDictionary"] ? $_EXTCONF["defaultDictionary"] : 'en';
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['AspellDirectory'] = $_EXTCONF["AspellDirectory"] ? $_EXTCONF["AspellDirectory"] : '/usr/bin/aspell';
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['noSpellCheckLanguages'] = $_EXTCONF["noSpellCheckLanguages"] ? $_EXTCONF["noSpellCheckLanguages"] : 'ja,km,ko,lo,th,zh,b5,gb';
-
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableInOpera9'] = $_EXTCONF['enableInOpera9'] ? $_EXTCONF['enableInOpera9'] : 0;
 
+       // Integrating with DAM
        // DAM browser may be enabled here only for DAM version lower than 1.1
        // If DAM 1.1+ is installed, the setting must be unset, DAM own EM setting should be used
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDAMBrowser'] = 0;
@@ -191,50 +77,170 @@ if (t3lib_extMgm::isLoaded('dam')) {
        require(t3lib_extMgm::extPath('dam') . 'ext_emconf.php');
        $_EXTKEY = $saveExtKey;
        if (t3lib_div::int_from_ver($EM_CONF['dam']['version']) < 1001000) {
+                       // Register DAM element browser rendering
                $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDAMBrowser'] = $_EXTCONF['enableDAMBrowser'] ? $_EXTCONF['enableDAMBrowser'] : 0;
+               if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDAMBrowser']) {
+                       $TYPO3_CONF_VARS['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'][] = 'EXT:'.$_EXTKEY.'/mod4/class.tx_rtehtmlarea_dam_browse_media.php:&tx_rtehtmlarea_dam_browse_media';
+                       $TYPO3_CONF_VARS['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'][] = 'EXT:'.$_EXTKEY.'/mod3/class.tx_rtehtmlarea_dam_browse_links.php:&tx_rtehtmlarea_dam_browse_links';
+               }
        }
 }
 
-       // Add default RTE transformation configuration
-t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/proc/pageTSConfig.txt">');
+       // Configure Lorem Ipsum hook to insert nonsense in wysiwyg mode
+if (t3lib_extMgm::isLoaded('lorem_ipsum') && (TYPO3_MODE == 'BE')) {
+    $TYPO3_CONF_VARS['EXTCONF']['lorem_ipsum']['RTE_insert'][] = 'tx_rtehtmlarea_base->loremIpsumInsert';
+}
 
-       // Add default Page TSonfig RTE configuration
-t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/' . strtolower($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration']) . '/pageTSConfig.txt">');
+       // Initialize plugin registration array
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins'] = array();
 
-       // Add default Page TSonfig RTE configuration for enabling images with the Minimal and Typical default configuration
-if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages']) {
-       t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/image/pageTSConfig.txt">');
+       // Inline Elements configuration
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultInline'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultInline']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultInline/class.tx_rtehtmlarea_defaultinline.php:&tx_rtehtmlarea_defaultinline';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultInline']['addIconsToSkin'] = 1;
+if ($_EXTCONF['enableInlineElements']) {
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['InlineElements'] = array();
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['InlineElements']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/InlineElements/class.tx_rtehtmlarea_inlineelements.php:&tx_rtehtmlarea_inlineelements';
+       t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/extensions/InlineElements/res/pageTSConfig.txt">');
 }
-
+       // Block Elements configuration
+       // Set compatibility warnings in the Update Wizard of the Install Tool
+$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['tx_rtehtmlarea_indent'] = array(
+       'title' => 'htmlArea RTE: Using CSS classes for indentation and alignment',
+       'version' => 4002000,
+       'description' => '<ul>
+                               <li><b>Indentation is produced by a CSS class instead of the blockquote element.</b><br />You will need to specify in Page TSConfig the class to be used for indentation using property buttons.indent.useClass (default is "indent"). You will need to define this class in your stylesheets and ensure that it is allowed by the RTE transformation (RTE.default.proc). Alternatively, you may continue using the blockquote element by setting property buttons.indent.useBlockquote. You may also want to add the new blockquote button to the RTE toolbar.</li>
+                               <li><b>Text alignment is produced by CSS classes instead of deprecated align attribute.</b><br />You will need to specify in Page TSConfig the class to be used for each text alignment button using property buttons.[<i>left, center, right or justifyfull</i>].useClass (defaults are "align-left", "align-center", "align-right", "align-justify"). You will need to define these classes in your stylesheets, and ensure that they are allowed by the RTE transformation (RTE.default.proc). Alternatively, you may continue using deprecated align attribute by setting property buttons.[<i>left, center, right or justifyfull</i>].useAlignAttribute.</li>
+                       </ul>'
+);
        // Add compatibility Page TSConfig for indentation and alignment
 if (!t3lib_div::compat_version('4.2.0')) {
        t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/indentalign/pageTSConfig.txt">');
 }
-
-       // Configure extended Inline Elements
-if ($_EXTCONF['enableInlineElements']) {
-       $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';
-       t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/extensions/InlineElements/res/pageTSConfig.txt">');
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['BlockElements'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['BlockElements']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php:&tx_rtehtmlarea_blockelements';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['BlockElements']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefinitionList'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefinitionList']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefinitionList/class.tx_rtehtmlarea_definitionlist.php:&tx_rtehtmlarea_definitionlist';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefinitionList']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['BlockStyle'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['BlockStyle']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/BlockStyle/class.tx_rtehtmlarea_blockstyle.php:&tx_rtehtmlarea_blockstyle';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['CharacterMap'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['CharacterMap']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/CharacterMap/class.tx_rtehtmlarea_charactermap.php:&tx_rtehtmlarea_charactermap';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['CharacterMap']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Acronym'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Acronym']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/Acronym/class.tx_rtehtmlarea_acronym.php:&tx_rtehtmlarea_acronym';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Acronym']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Acronym']['disableInFE'] = 1;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UserElements'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UserElements']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/UserElements/class.tx_rtehtmlarea_userelements.php:&tx_rtehtmlarea_userelements';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UserElements']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UserElements']['disableInFE'] = 1;
+$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
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages'] = $_EXTCONF['enableImages'] ? $_EXTCONF['enableImages'] : 0;
+if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages']) {
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultImage'] = array();
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultImage']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultImage/class.tx_rtehtmlarea_defaultimage.php:&tx_rtehtmlarea_defaultimage';
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultImage']['addIconsToSkin'] = 0;
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Image'] = array();
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Image']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3Image/class.tx_rtehtmlarea_typo3image.php:&tx_rtehtmlarea_typo3image';
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Image']['addIconsToSkin'] = 0;
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Image']['disableInFE'] = 1;
+       t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/image/pageTSConfig.txt">');
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableClickEnlarge'] = $_EXTCONF['enableClickEnlarge'] ? $_EXTCONF['enableClickEnlarge'] : 0;
 }
-
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultLink'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultLink']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultLink/class.tx_rtehtmlarea_defaultlink.php:&tx_rtehtmlarea_defaultlink';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultLink']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php:&tx_rtehtmlarea_typo3link';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['disableInFE'] = 1;
        // Add default Page TSonfig 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">');
 }
-
-       // Register DAM element browser rendering
-if (t3lib_extMgm::isLoaded('dam') && $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDAMBrowser']) {
-       $TYPO3_CONF_VARS['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'][] = 'EXT:'.$_EXTKEY.'/mod4/class.tx_rtehtmlarea_dam_browse_media.php:&tx_rtehtmlarea_dam_browse_media';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'][] = 'EXT:'.$_EXTKEY.'/mod3/class.tx_rtehtmlarea_dam_browse_links.php:&tx_rtehtmlarea_dam_browse_links';
-}
-
-       // Add default User TSonfig RTE configuration
-t3lib_extMgm::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/' . strtolower($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration']) . '/userTSConfig.txt">');
-
-       // Configure Lorem Ipsum hook to insert nonsense in wysiwyg mode
-if (t3lib_extMgm::isLoaded('lorem_ipsum') && (TYPO3_MODE == 'BE')) {
-    $TYPO3_CONF_VARS['EXTCONF']['lorem_ipsum']['RTE_insert'][] = 'tx_rtehtmlarea_base->loremIpsumInsert';
+       // Register features that use the style attribute
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['allowStyleAttribute'] = $_EXTCONF['allowStyleAttribute'] ? $_EXTCONF['allowStyleAttribute'] : 0;
+if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['allowStyleAttribute']) {
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultColor'] = array();
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultColor']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultColor/class.tx_rtehtmlarea_defaultcolor.php:&tx_rtehtmlarea_defaultcolor';
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultColor']['addIconsToSkin'] = 0;
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultColor']['disableInFE'] = 0;
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Color'] = array();
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Color']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3Color/class.tx_rtehtmlarea_typo3color.php:&tx_rtehtmlarea_typo3color';
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Color']['addIconsToSkin'] = 0;
+       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Color']['disableInFE'] = 0;
+       t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/res/style/pageTSConfig.txt">');
 }
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultFont'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultFont']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php:&tx_rtehtmlarea_defaultfont';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultFont']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultFont']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['InsertSmiley'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['InsertSmiley']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/InsertSmiley/class.tx_rtehtmlarea_insertsmiley.php:&tx_rtehtmlarea_insertsmiley';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['InsertSmiley']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['InsertSmiley']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Language'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Language']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/Language/class.tx_rtehtmlarea_language.php:&tx_rtehtmlarea_language';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Language']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['Language']['disableInFE'] = 0;
+
+       // Spell checking configuration
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['dictionaryList'] = $_EXTCONF['dictionaryList'] ? $_EXTCONF['dictionaryList'] : 'en';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultDictionary'] = $_EXTCONF['defaultDictionary'] ? $_EXTCONF['defaultDictionary'] : 'en';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['AspellDirectory'] = $_EXTCONF['AspellDirectory'] ? $_EXTCONF['AspellDirectory'] : '/usr/bin/aspell';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['noSpellCheckLanguages'] = $_EXTCONF['noSpellCheckLanguages'] ? $_EXTCONF['noSpellCheckLanguages'] : 'ja,km,ko,lo,th,zh,b5,gb';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['forceCommandMode'] = $_EXTCONF['forceCommandMode'] ? $_EXTCONF['forceCommandMode'] : 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['SpellChecker'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['SpellChecker']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/SpellChecker/class.tx_rtehtmlarea_spellchecker.php:&tx_rtehtmlarea_spellchecker';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['SpellChecker']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['SpellChecker']['disableInFE'] = 0;
+
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['FindReplace'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['FindReplace']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/FindReplace/class.tx_rtehtmlarea_findreplace.php:&tx_rtehtmlarea_findreplace';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['FindReplace']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['FindReplace']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/RemoveFormat/class.tx_rtehtmlarea_removeformat.php:&tx_rtehtmlarea_removeformat';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultClean'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['DefaultClean']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php:&tx_rtehtmlarea_defaultclean';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3HtmlParser'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3HtmlParser']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php:&tx_rtehtmlarea_typo3htmlparser';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3HtmlParser']['disableInFE'] = 1;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['QuickTag'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['QuickTag']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/QuickTag/class.tx_rtehtmlarea_quicktag.php:&tx_rtehtmlarea_quicktag';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['QuickTag']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['QuickTag']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TableOperations'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TableOperations']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php:&tx_rtehtmlarea_tableoperations';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TableOperations']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TableOperations']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['AboutEditor'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['AboutEditor']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/AboutEditor/class.tx_rtehtmlarea_abouteditor.php:&tx_rtehtmlarea_abouteditor';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['AboutEditor']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['AboutEditor']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['ContextMenu'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['ContextMenu']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/ContextMenu/class.tx_rtehtmlarea_contextmenu.php:&tx_rtehtmlarea_contextmenu';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['ContextMenu']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['ContextMenu']['disableInFE'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UndoRedo'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UndoRedo']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/UndoRedo/class.tx_rtehtmlarea_undoredo.php:&tx_rtehtmlarea_undoredo';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UndoRedo']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['UndoRedo']['disableInFE'] = 0;
+
+       // Copy & Paste configuration
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableMozillaExtension'] = $_EXTCONF['enableMozillaExtension'] ? $_EXTCONF['enableMozillaExtension'] : 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['mozAllowClipboardURL'] = $_EXTCONF['mozAllowClipboardURL'] ? $_EXTCONF['mozAllowClipboardURL'] : 'http://typo3.org/fileadmin/dl/allowclipboard_helper/allowclipboard_helper-0.5.5-fx_mz_zm_deLabelFix.xpi';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['CopyPaste'] = array();
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['CopyPaste']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/CopyPaste/class.tx_rtehtmlarea_copypaste.php:&tx_rtehtmlarea_copypaste';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['CopyPaste']['addIconsToSkin'] = 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['CopyPaste']['disableInFE'] =  0;
 
 ?>
\ No newline at end of file
index 6fad0c2..0fb0e0a 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the Typo3 project. The Typo3 project is
@@ -50,7 +50,7 @@ class tx_rtehtmlarea_typo3color extends tx_rtehtmlareaapi {
                );
        
        public function main($parentObject) {
-               return parent::main($parentObject) && (!$this->thisConfig['disableSelectColor'] || $this->htmlAreaRTE->client['BROWSER'] == 'gecko');
+               return parent::main($parentObject) && !$this->thisConfig['disableSelectColor'];
        }
        
        /**
index babc5c1..efba1c9 100644 (file)
@@ -191,6 +191,17 @@ BlockElements = HTMLArea.Plugin.extend({
        },
        
        /*
+        * This function adds an attribute to the array of allowed attributes on inline elements
+        *
+        * @param       string  attribute: the name of the attribute to be added to the array
+        *
+        * @return      void
+        */
+       addAllowedAttribute : function (attribute) {
+               this.allowedAttributes.push(attribute);
+       },
+       
+       /*
         * This function gets called when some block element was selected in the drop-down list
         */
        onChange : function (editor, buttonId) {
index 39ba731..7f55b1e 100644 (file)
@@ -85,6 +85,14 @@ DefaultColor = HTMLArea.Plugin.extend({
                ["ForeColor", "textcolor"],
                ["HiliteColor", "bgcolor"]
        ],
+       
+       /*
+        * Conversion object: button name or command name to corresponding style property name
+        */
+       styleProperty : {
+               ForeColor       : "color",
+               HiliteColor     : "backgroundColor"
+       },
         
        /*
         * This function gets called when the button was pressed.
@@ -99,15 +107,12 @@ DefaultColor = HTMLArea.Plugin.extend({
                        // 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"        :
+                       case "HiliteColor":
+                               this.dialog = this.openDialog(buttonId, this.makeUrlFromPopupName("select_color"), "setColor", HTMLArea._colorToRgb(this.editor._doc.queryCommandValue(HTMLArea.is_ie ? "BackColor" : this.commandId)), {width:300, height:210});
+                               break;
+                       case "ForeColor":
                                this.dialog = this.openDialog(buttonId, this.makeUrlFromPopupName("select_color"), "setColor", HTMLArea._colorToRgb(this.editor._doc.queryCommandValue(this.commandId)), {width:300, height:210});
                                break;
                        default:
@@ -125,9 +130,16 @@ DefaultColor = HTMLArea.Plugin.extend({
         * @return      boolean         false
         */
        setColor : function(color) {
-               this.editor.focusEditor();
-               if (color) {
-                       this.editor._doc.execCommand(this.commandId, false, "#" + color);
+               var editor = this.editor;
+               if (color && editor.endPointsInSameBlock()) {
+                       var selection = editor._getSelection();
+                       var range = editor._createRange(selection);
+                       var element = editor._doc.createElement("span");
+                       element.style[this.styleProperty[this.commandId]] = "#" + color;
+                       editor.wrapWithInlineElement(element, selection, range);
+                       if (HTMLArea.is_gecko) {
+                               range.detach();
+                       }
                }
                return false;
        },
@@ -147,6 +159,23 @@ DefaultColor = HTMLArea.Plugin.extend({
                        this.editor.plugins[this.commandId].instance.dialog.dialogWindow.insertColor("#" + color);
                }
                return false;
+       },
+       
+       /*
+        * This function gets called when the toolbar is updated
+        */
+       onUpdateToolbar : function () {
+               var editor = this.editor;
+               if (editor.getMode() === "wysiwyg" && editor.isEditable()) {
+                       var buttonId;
+                       for (var i = 0, n = this.buttonList.length; i < n; ++i) {
+                               buttonId = this.buttonList[i][0];
+                               var obj = editor._toolbarObjects[buttonId];
+                               if ((typeof(obj) !== "undefined")) {
+                                       obj.state("enabled", editor.endPointsInSameBlock());
+                               }
+                       }
+               }
        }
 });
 
index faa097c..cabcc85 100644 (file)
@@ -43,12 +43,30 @@ TYPO3Color = HTMLArea.Plugin.extend({
                this.buttonsConfiguration = this.editorConfiguration.buttons;
                this.colorsConfiguration = this.editorConfiguration.colors;
                this.disableColorPicker = this.editorConfiguration.disableColorPicker;
-               
+
+                       // Coloring will use the style attribute
+               if (this.editor.plugins.TextStyle && this.editor.plugins.TextStyle.instance) {
+                       this.editor.plugins.TextStyle.instance.addAllowedAttribute("style");
+                       this.allowedAttributes = this.editor.plugins.TextStyle.instance.allowedAttributes;
+               }                       
+               if (this.editor.plugins.InlineElements && this.editor.plugins.InlineElements.instance) {
+                       this.editor.plugins.InlineElements.instance.addAllowedAttribute("style");
+                       if (!this.allowedAllowedAttributes) {
+                               this.allowedAttributes = this.editor.plugins.InlineElements.instance.allowedAttributes;
+                       }
+               }
+               if (this.editor.plugins.BlockElements && this.editor.plugins.BlockElements.instance) {
+                       this.editor.plugins.BlockElements.instance.addAllowedAttribute("style");
+               }
+               if (!this.allowedAttributes) {
+                       this.allowedAttributes = new Array("id", "title", "lang", "xml:lang", "dir", (HTMLArea.is_gecko?"class":"className"), "style");
+               }
+
                /*
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : "2.1",
+                       version         : "3.0",
                        developer       : "Stanislas Rolland",
                        developerUrl    : "http://www.sjbr.ca/",
                        copyrightOwner  : "Stanislas Rolland",
@@ -57,7 +75,7 @@ TYPO3Color = HTMLArea.Plugin.extend({
                        license         : "GPL"
                };
                this.registerPluginInformation(pluginInformation);
-               
+
                /*
                 * Registering the buttons
                 */
@@ -77,7 +95,7 @@ TYPO3Color = HTMLArea.Plugin.extend({
                
                return true;
         },
-        
+
        /*
         * The list of buttons added by this plugin
         */
@@ -87,6 +105,14 @@ TYPO3Color = HTMLArea.Plugin.extend({
        ],
 
        /*
+        * Conversion object: button name to corresponding style property name
+        */
+       styleProperty : {
+               ForeColor       : "color",
+               HiliteColor     : "backgroundColor"
+       },
+
+       /*
         * This function gets called when the button was pressed.
         *
         * @param       object          editor: the editor instance
@@ -95,25 +121,17 @@ TYPO3Color = HTMLArea.Plugin.extend({
         *
         * @return      boolean         false if action is completed
         */
-       onButtonPress : function(editor, id, target) {
+       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.dialogSelectColor(buttonId,"","");
        },
-       
+
        dialogSelectColor : function (buttonId, element, field, dialogOpener) {
                var dimensions = {
-                       width   : 500,
-                       height  : 245
+                       width   : 440,
+                       height  : 300
                };
                var arguments = {
                        title           : buttonId + "_title",
@@ -150,19 +168,8 @@ TYPO3Color = HTMLArea.Plugin.extend({
                var doc = editor._doc;
                var buttonId = dialog.arguments.buttonId;
                var initialValue;
-               switch (buttonId) {
-                       case "ForeColor"        :
-                               initialValue = HTMLArea._colorToRgb(doc.queryCommandValue("ForeColor"));
-                               break;
-                       case "HiliteColor"      :
-                               initialValue = doc.queryCommandValue(((HTMLArea.is_ie || HTMLArea.is_safari) ? "BackColor" : "HiliteColor"));
-                               if (/transparent/i.test(initialValue)) {
-                                       // Mozilla
-                                       initialValue = doc.queryCommandValue("BackColor");
-                               }
-                               initialValue = HTMLArea._colorToRgb(initialValue);
-                               break;
-               }
+               var parentElement = editor.getParentElement();
+               initialValue = HTMLArea._colorToRgb(parentElement.style[this.styleProperty[buttonId]]);
                dialog.content.innerHTML = this.renderPopupSelectColor(buttonId, dialog, dialog.arguments.title, initialValue);
                var colorTable = dialog.document.getElementById("colorTable");
                colorTable.onclick = function(e) {
@@ -180,29 +187,53 @@ TYPO3Color = HTMLArea.Plugin.extend({
                        dialog.callFormInputHandler();
                        return false;
                };
-               try {
-                       with (dialog.document.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.document.getElementById(buttonId+"Current").style.backgroundColor = initialValue;
+               dialog.addButtons("ok", "cancel");
        },
        
        /*
         * Set the color and close the ForeColor and the HiliteColor select color dialogues
         */
        setColor : function(dialog, params) {
-               this.processStyle(dialog, params, dialog.arguments.element, dialog.arguments.field);
+               var editor = this.editor, element;
+               switch (dialog.arguments.buttonId) {
+                       case "ForeColor":
+                       case "HiliteColor":
+                               var selection = editor._getSelection();
+                               var range = editor._createRange(selection);
+                               if (editor._selectionEmpty(selection)) {
+                                       element = editor.getParentElement(selection, range);
+                                               // Set the color in the style attribute
+                                       this.processStyle(dialog, params, element, dialog.arguments.field);
+                                               // Remove the span tag if it has no more attribute
+                                       if ((element.nodeName.toLowerCase() === "span") && !HTMLArea.hasAllowedAttributes(element, this.allowedAttributes)) {
+                                               editor.removeMarkup(element);
+                                       }
+                               } else if (editor._statusBarTree.selected) {
+                                       element = editor._statusBarTree.selected;
+                                               // Set the color in the style attribute
+                                       this.processStyle(dialog, params, element, dialog.arguments.field);
+                                               // Remove the span tag if it has no more attribute
+                                       if ((element.nodeName.toLowerCase() === "span") && !HTMLArea.hasAllowedAttributes(element, this.allowedAttributes)) {
+                                               editor.removeMarkup(element);
+                                       }
+                               } else if (editor.endPointsInSameBlock()) {
+                                       element = editor._doc.createElement("span");
+                                               // Set the color in the style attribute
+                                       this.processStyle(dialog, params, element, dialog.arguments.field);
+                                       editor.wrapWithInlineElement(element, selection, range);
+                                       if (HTMLArea.is_gecko) {
+                                               range.detach();
+                                       }
+                               }
+                               break;
+                       case "color":
+                       default:
+                               element = dialog.arguments.element;
+                                       // Set the color in the style attribute
+                               this.processStyle(dialog, params, element, dialog.arguments.field);
+                               break;
+               }
                dialog.close();
        },
        
@@ -213,7 +244,7 @@ TYPO3Color = HTMLArea.Plugin.extend({
        selectColorCodeInit : function(dialog) {
                var buttonId = dialog.arguments.buttonId;
                var field = dialog.arguments.field;
-               dialog.content.innerHTML = this.renderPopupSelectColor(buttonId, dialog, this.localize(dialog.arguments.title), field.value);
+               dialog.content.innerHTML = this.renderPopupSelectColor(buttonId, dialog, this.localize(dialog.arguments.title), (field.value ? field.value : ""));
                var colorTable = dialog.document.getElementById("colorTable");
                colorTable.onclick = function(e) {
                        if(!e) var e = dialog.dialogWindow.event;
@@ -239,6 +270,7 @@ TYPO3Color = HTMLArea.Plugin.extend({
                } else if (buttonId === "tag"){
                        dialog.document.getElementById(buttonId+"Current").style.backgroundColor = "";
                }
+               dialog.addButtons("ok", "cancel");
        },
        
        /*
@@ -253,31 +285,22 @@ TYPO3Color = HTMLArea.Plugin.extend({
        * 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;
+               if (element) {
+                       for (var i in params) {
+                               var val = params[i];
+                               if (val && val.charAt(0) != "#") {
+                                       val = "#" + val;
+                               }
+                               switch (i) {
+                                       case "ForeColor":
+                                       case "HiliteColor":
+                                               element.style[this.styleProperty[i]] = val;
+                                               break;
+                                       case "color":
+                                               element.style.backgroundColor = val;
+                                               field.value = val;
+                                               break;
+                               }
                        }
                }
        },
@@ -298,15 +321,6 @@ TYPO3Color = HTMLArea.Plugin.extend({
                
                sz = '<div class="title">' + title + '</div>';
                sz += '<form id="HA-color-select-form"><fieldset>';
-               sz += '<input type="hidden" name="' + sID + '" id="' + sID + '" value="' + initialValue + '" />';
-               sz += '<div class="buttonColor" ';
-               sz += '         onMouseover="className += \' buttonColor-hilite\';" ';
-               sz += '         onMouseout="className = \'buttonColor\';">';
-               sz += ' <span id="' + szID + '" class="chooser">&nbsp;</span>';
-               sz += ' <span id="colorUnset" class="nocolor" title="' + "no_color" + '" ';
-               sz += '         onMouseover="className += \' nocolor-hilite\';" ';
-               sz += '         onMouseout="className = \'nocolor\';"';
-               sz += ' >&#x00d7;</span></div>';
                sz += '<div class="colorTableWrapper"><table class="colorTable" cellspacing="0" cellpadding="0" id="colorTable">';
                var onMouseOut = ' onMouseout="document.getElementById(\'' + szID + '\').style.backgroundColor=\'\'; document.getElementById(\'' + sID + '\').value=\'\';"';
                var onMouseOver = ' onMouseover="if(' + HTMLArea.is_ie + '){ if (event.srcElement.bgColor) { document.getElementById(\'' + szID + '\').style.backgroundColor = event.srcElement.bgColor; document.getElementById(\'' + sID + '\').value = event.srcElement.bgColor;} } else { if (event.target.bgColor) { document.getElementById(\'' + szID + '\').style.backgroundColor=event.target.bgColor; document.getElementById(\'' + sID + '\').value=event.target.bgColor;} };" ';
@@ -340,10 +354,40 @@ TYPO3Color = HTMLArea.Plugin.extend({
                                sz += '</tr>';
                        }
                }
-               
-               sz += '</table></div>';
+               sz += '</table>';
+               sz += '<div class="space"></div>';
+               sz += '<label for="' + sID + '" class="fr">Color:</label>';
+               sz += '<div class="buttonColor" ';
+               sz += '         onMouseover="className += \' buttonColor-hilite\';" ';
+               sz += '         onMouseout="className = \'buttonColor\';">';
+               sz += ' <span id="' + szID + '" class="chooser">&nbsp;</span>';
+               sz += ' <span id="colorUnset" class="nocolor" title="' + "no_color" + '" ';
+               sz += '         onMouseover="className += \' nocolor-hilite\';" ';
+               sz += '         onMouseout="className = \'nocolor\';"';
+               sz += ' >&#x00d7;</span></div>';
+               sz += '<input type="text" name="' + sID + '" id="' + sID + '" value="' + initialValue + '" />';
                sz += '</fieldset></form>';
                return sz;
+       },
+       
+       /*
+        * This function gets called when the toolbar is updated
+        */
+       onUpdateToolbar : function () {
+               var editor = this.editor;
+               if (editor.getMode() === "wysiwyg" && editor.isEditable()) {
+                       var buttonId;
+                       var parentElement = editor._statusBarTree.selected ? editor._statusBarTree.selected : editor.getParentElement();
+                       var enabled = editor.endPointsInSameBlock() && !(editor._selectionEmpty(editor._getSelection()) && parentElement.nodeName.toLowerCase() == "body");
+                       for (var i = 0, n = this.buttonList.length; i < n; ++i) {
+                               buttonId = this.buttonList[i][0];
+                               var obj = editor._toolbarObjects[buttonId];
+                               if ((typeof(obj) !== "undefined")) {
+                                       obj.state("active", parentElement.style[this.styleProperty[buttonId]]);
+                                       obj.state("enabled", enabled);
+                               }
+                       }
+               }
        }
 });
 
index ecc76bc..19f8f6b 100644 (file)
 .popupwin .buttonColor {
        cursor:default;
        border-style:solid;border-width:1px;border-color:ButtonHighlight ButtonShadow ButtonHighlight ButtonHighlight;
-       padding:1px;margin:46px 10px 0 0;
+       padding:1px;margin:2px 10px 0 0;
        height:1em;
        white-space:nowrap;
 }
diff --git a/typo3/sysext/rtehtmlarea/res/style/pageTSConfig.txt b/typo3/sysext/rtehtmlarea/res/style/pageTSConfig.txt
new file mode 100644 (file)
index 0000000..d533752
--- /dev/null
@@ -0,0 +1,52 @@
+# ***************************************************************************************
+# Default proc options in Page TSconfig for htmlArea RTE formatting with style attribute
+#
+# @author      Stanislas Rolland <typo3(arobas)sjbr.ca>
+#
+# TYPO3 SVN ID: $Id: pageTSConfig.txt $
+# ***************************************************************************************
+
+       ## Default RTE processing rules
+RTE.default.proc {
+
+               ## ALLOWED P & DIV ATTRIBUTES
+       keepPDIVattribs := addToList(style)
+
+               ## CONTENT TO DATABASE
+       entryHTMLparser_db {
+               tags {
+                               ## CLEAN ATTRIBUTES ON THE FOLLOWING TAGS
+                       span.fixAttrib.style.unset >
+                       span.allowedAttribs = id, title, dir, lang, xml:lang, class, style
+                       p.allowedAttribs := addToList(style)
+                       div < .p
+                       hr.allowedAttribs := addToList(style)
+                       b.allowedAttribs := addToList(style)
+                       bdo.allowedAttribs := addToList(style)
+                       big.allowedAttribs := addToList(style)
+                       blockquote.allowedAttribs := addToList(style)
+                       cite.allowedAttribs := addToList(style)
+                       code.allowedAttribs := addToList(style)
+                       del.allowedAttribs := addToList(style)
+                       dfn.allowedAttribs := addToList(style)
+                       em.allowedAttribs := addToList(style)
+                       i.allowedAttribs := addToList(style)
+                       ins.allowedAttribs := addToList(style)
+                       kbd.allowedAttribs := addToList(style)
+                       label.allowedAttribs := addToList(style)
+                       q.allowedAttribs := addToList(style)
+                       samp.allowedAttribs := addToList(style)
+                       small.allowedAttribs := addToList(style)
+                       strike.allowedAttribs := addToList(style)
+                       strong.allowedAttribs := addToList(style)
+                       sub.allowedAttribs := addToList(style)
+                       sup.allowedAttribs := addToList(style)
+                       tt.allowedAttribs := addToList(style)
+                       u.allowedAttribs := addToList(style)
+                       var.allowedAttribs := addToList(style)
+               }
+       }
+}
+
+       ## Use same RTE processing rules in FE
+RTE.default.FE.proc < RTE.default.proc
index 91e756a..f1e5d13 100644 (file)
 .popupwin .buttonColor {
        cursor:default;
        border-style:solid;border-width:1px;border-color:ButtonHighlight ButtonShadow ButtonHighlight ButtonHighlight;
-       padding:1px;margin:46px 10px 0 0;
+       padding:1px;margin:2px 10px 0 0;
        height:1em;
        white-space:nowrap;
 }