Index: /FCKeditor/branches/features/style/editor/_source/classes/fckdocumentfragment_gecko.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckdocumentfragment_gecko.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fckdocumentfragment_gecko.js	(revision 766)
@@ -44,9 +44,4 @@
 	{
 		FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ;
-	},
-
-	InsertBeforeNode : function( existingNode )
-	{
-		existingNode.parentNode.insertBefore( this.RootNode, existingNode ) ;
 	}
 }
Index: /FCKeditor/branches/features/style/editor/_source/classes/fckdocumentfragment_ie.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckdocumentfragment_ie.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fckdocumentfragment_ie.js	(revision 766)
@@ -56,13 +56,4 @@
 		while( ( eLast = eRoot.lastChild ) )
 			FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ;
-	},
-
-	InsertBeforeNode : function( existingNode )
-	{
-		var eRoot = this.RootNode ;
-		var eFirst ;
-
-		while( ( eFirst = eRoot.firstChild ) )
-			existingNode.parentNode.insertBefore( eRoot.removeChild( eFirst ), existingNode ) ;
 	}
 } ;
Index: /FCKeditor/branches/features/style/editor/_source/classes/fckspecialcombo.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckspecialcombo.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fckspecialcombo.js	(revision 766)
@@ -169,9 +169,15 @@
 FCKSpecialCombo.prototype.SetLabel = function( text )
 {
-	this.Label = text.length == 0 ? '&nbsp;' : text ;
-
-	if ( this._LabelEl )
-	{
-		this._LabelEl.innerHTML = this.Label ;
+	text = ( !text || text.length == 0 ) ? '&nbsp;' : text ;
+	
+	if ( text == this.Label )
+		return ;
+
+	this.Label = text ;
+
+	var labelEl = this._LabelEl ;
+	if ( labelEl )
+	{
+		labelEl.innerHTML = text ;
 
 		// It may happen that the label is some HTML, including tags. This
@@ -179,5 +185,5 @@
 		// combo will get the selection from the editing area. So we must
 		// disable any kind of selection here.
-		FCKTools.DisableSelection( this._LabelEl ) ;
+		FCKTools.DisableSelection( labelEl ) ;
 	}
 }
Index: /FCKeditor/branches/features/style/editor/_source/classes/fckstyle.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckstyle.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fckstyle.js	(revision 766)
@@ -65,5 +65,5 @@
 		var type = this.GetType_$ ;
 
-		if ( typeof type != 'undefined' )
+		if ( type != undefined )
 			return type ;
 
@@ -94,10 +94,10 @@
 	/**
 	 * Apply the style to a FCKDomRange.
-	 *
-	 * TODO:
-	 *  - Implement the Object type style.
 	 */
 	ApplyToRange : function( range, selectIt )
 	{
+		// ApplyToRange is not valid for FCK_STYLE_OBJECT types.
+		// Use ApplyToObject instead.
+		
 		switch ( this.GetType() )
 		{
@@ -108,5 +108,4 @@
 				this.ApplyToRange = this._ApplyInlineStyle ;
 				break ;
-			case FCK_STYLE_OBJECT :
 			default :
 				return ;
@@ -114,4 +113,15 @@
 
 		this.ApplyToRange( range, selectIt ) ;
+	},
+	
+	/**
+	 * Apply the style to an object. Valid for FCK_STYLE_BLOCK types only.
+	 */
+	ApplyToObject : function( objectElement )
+	{
+		if ( !objectElement )
+			return ;
+		
+		this.BuildElement( null, objectElement ) ;
 	},
 
@@ -221,5 +231,10 @@
 					{
 						if ( FCKDomTools.HasAttribute( currentNode, att ) )
-							FCKDomTools.RemoveAttribute( currentNode, att ) ;
+						{
+							if ( att == 'style' )
+								this._RemoveStylesFromElement( currentNode ) ;
+							else
+								FCKDomTools.RemoveAttribute( currentNode, att ) ;
+						}
 					}
 				}
@@ -255,5 +270,5 @@
 	 * current style definition.
 	 */
-	CheckElementRemovable : function( element )
+	CheckElementRemovable : function( element, fullMatch )
 	{
 		var elementName = element.nodeName.toLowerCase() ;
@@ -263,14 +278,30 @@
 		{
 			// If no attributes are defined in the element.
-			if ( !FCKDomTools.HasAttributes( element ) )
+			if ( !fullMatch && !FCKDomTools.HasAttributes( element ) )
 				return true ;
 
 			// If any attribute conflicts with the style attributes.
 			var attribs = this._GetAttribsForComparison() ;
+			var allMatched = false ;
 			for ( var att in attribs )
 			{
-				if ( FCKDomTools.HasAttribute( element, att ) )
-					return true ;
-			}
+				if ( att == '_length' )
+					continue ;
+
+				if ( this._CompareAttributeValues( att, FCKDomTools.GetAttributeValue( element, att ), ( this.GetFinalAttributeValue( att ) || '' ) ) )
+				{
+					allMatched = true ;
+					if ( !fullMatch )
+						break ;
+				}
+				else
+				{
+					allMatched = false ;
+					if ( fullMatch )
+						break ;
+				}
+			}
+			if ( allMatched )
+				return true ;
 		}
 
@@ -362,5 +393,10 @@
 			{
 				if ( FCKDomTools.HasAttribute( innerElement, att ) )
-					FCKDomTools.RemoveAttribute( innerElement, att ) ;
+				{
+					if ( att == 'style' )
+						this._RemoveStylesFromElement( innerElement ) ;
+					else
+						FCKDomTools.RemoveAttribute( innerElement, att ) ;
+				}
 			}
 
@@ -389,4 +425,26 @@
 			}
 		}
+	},
+	
+	_RemoveStylesFromElement : function( element )
+	{
+		var elementStyle = element.style.cssText ;
+		var pattern = this.GetFinalStyleValue() ;
+		
+		if ( elementStyle.length > 0 && pattern.length == 0 )
+			return ;
+			
+		pattern = '(^|;)\\s*(' + 
+			pattern.replace( /\s*([^ ]+):.*?(;|$)/g, '$1|' ).replace( /\|$/, '' ) +
+			'):[^;]+' ;
+			
+		var regex = new RegExp( pattern, 'gi' ) ;
+		
+		elementStyle = elementStyle.replace( regex, '' ).Trim() ;
+		
+		if ( elementStyle.length == 0 || elementStyle == ';' )
+			FCKDomTools.RemoveAttribute( element, 'style' ) ;
+		else
+			element.style.cssText = elementStyle.replace( regex, '' ) ;
 	},
 
@@ -450,8 +508,8 @@
 	 * Creates a DOM element for this style object.
 	 */
-	BuildElement : function( targetDoc )
+	BuildElement : function( targetDoc, element )
 	{
 		// Create the element.
-		var el = targetDoc.createElement( this.Element ) ;
+		var el = element || targetDoc.createElement( this.Element ) ;
 
 		// Assign all defined attributes.
@@ -477,10 +535,25 @@
 		return el ;
 	},
+	
+	_CompareAttributeValues : function( attName, valueA, valueB )
+	{
+		if ( attName == 'style' && valueA && valueB )
+		{
+			valueA = valueA.replace( /;$/, '' ).toLowerCase() ;
+			valueB = valueB.replace( /;$/, '' ).toLowerCase() ;
+		}
+		
+		return ( valueA == valueB )
+	},
 
 	GetFinalAttributeValue : function( attName )
 	{
-		var attValue = this._StyleDesc.Attributes[ attName ] ;
-
-		if ( this._Variables )
+		var attValue = this._StyleDesc.Attributes ;
+		var attValue = attValue ? attValue[ attName ] : null ;
+		
+		if ( !attValue && attName == 'style' )
+			return this.GetFinalStyleValue() ;
+
+		if ( attValue && this._Variables )
 			// Using custom Replace() to guarantee the correct scope.
 			attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ;
@@ -494,7 +567,10 @@
 
 		if ( attValue.length > 0 && this._Variables )
+		{
 			// Using custom Replace() to guarantee the correct scope.
 			attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ;
-
+			attValue = FCKTools.NormalizeCssText( attValue ) ;			
+		}
+		
 		return attValue ;
 	},
@@ -658,5 +734,5 @@
 		// Two different ranges will be detected:
 		//
-		//		"have <i>some</i> text."
+		//		"have <b>some</b> text."
 		//		"And some here"
 		//
@@ -815,8 +891,8 @@
 			range.SelectBookmark( bookmark ) ;
 	},
-
+	
 	_FixBookmarkStart : function( startNode )
 	{
-		// After appliying or remobing an inline style, the start boundary of
+		// After appliying or removing an inline style, the start boundary of
 		// the selection must be placed inside all inline elements it is
 		// bordering.
@@ -943,5 +1019,8 @@
 
 		// Builds the StyleText.
-		var stylesText = '' ;
+		var stylesText = ( this._StyleDesc.Attributes ? this._StyleDesc.Attributes['style'] || '' : '' ) ;
+		
+		if ( stylesText.length > 0 )
+			stylesText += ';' ;
 
 		for ( var style in stylesDef )
@@ -952,6 +1031,8 @@
 		// are variables inside the style.
 		if ( stylesText.length > 0 && !( /#\(/.test( stylesText ) ) )
+		{
 			stylesText = FCKTools.NormalizeCssText( stylesText ) ;
-
+		}
+		
 		return (this._GetStyleText = function() { return stylesText ; })() ;
 	},
@@ -1074,5 +1155,5 @@
 			if ( att.specified )
 			{
-				attribs[ att.nodeName.toLowerCase() ] = att.nodeValue.toLowerCase() ;
+				attribs[ att.nodeName.toLowerCase() ] = FCKDomTools.GetAttributeValue( element, att ).toLowerCase() ;
 				attribsCount++ ;
 			}
Index: Keditor/branches/features/style/editor/_source/classes/fckstyledef.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckstyledef.js	(revision 765)
+++ 	(revision )
@@ -1,59 +1,0 @@
-﻿/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * FCKStyleDef Class: represents a single style definition.
- */
-
-var FCKStyleDef = function( name, element )
-{
-	this.Name = name ;
-	this.Element = element.toUpperCase() ;
-	this.IsObjectElement = FCKRegexLib.ObjectElements.test( this.Element ) ;
-	this.Attributes = new Object() ;
-}
-
-FCKStyleDef.prototype.AddAttribute = function( name, value )
-{
-	this.Attributes[ name ] = value ;
-}
-
-FCKStyleDef.prototype.GetOpenerTag = function()
-{
-	var s = '<' + this.Element ;
-
-	for ( var a in this.Attributes )
-		s += ' ' + a + '="' + this.Attributes[a] + '"' ;
-
-	return s + '>' ;
-}
-
-FCKStyleDef.prototype.GetCloserTag = function()
-{
-	return '</' + this.Element + '>' ;
-}
-
-
-FCKStyleDef.prototype.RemoveFromSelection = function()
-{
-	if ( FCKSelection.GetType() == 'Control' )
-		this._RemoveMe( FCK.ToolbarSet.CurrentInstance.Selection.GetSelectedElement() ) ;
-	else
-		this._RemoveMe( FCK.ToolbarSet.CurrentInstance.Selection.GetParentElement() ) ;
-}
Index: Keditor/branches/features/style/editor/_source/classes/fckstyledef_gecko.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckstyledef_gecko.js	(revision 765)
+++ 	(revision )
@@ -1,120 +1,0 @@
-﻿/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * FCKStyleDef Class: represents a single style definition. (Gecko specific)
- */
-
-FCKStyleDef.prototype.ApplyToSelection = function()
-{
-	if ( FCKSelection.GetType() == 'Text' && !this.IsObjectElement )
-	{
-		var oSelection = FCK.ToolbarSet.CurrentInstance.EditorWindow.getSelection() ;
-
-		// Create the main element.
-		var e = FCK.ToolbarSet.CurrentInstance.EditorDocument.createElement( this.Element ) ;
-
-		for ( var i = 0 ; i < oSelection.rangeCount ; i++ )
-		{
-			e.appendChild( oSelection.getRangeAt(i).extractContents() ) ;
-		}
-
-		// Set the attributes.
-		this._AddAttributes( e ) ;
-
-		// Remove the duplicated elements.
-		this._RemoveDuplicates( e ) ;
-
-		var oRange = oSelection.getRangeAt(0) ;
-		oRange.insertNode( e ) ;
-	}
-	else
-	{
-		var oControl = FCK.ToolbarSet.CurrentInstance.Selection.GetSelectedElement() ;
-		if ( oControl.tagName == this.Element )
-			this._AddAttributes( oControl ) ;
-	}
-}
-
-FCKStyleDef.prototype._AddAttributes = function( targetElement )
-{
-	for ( var a in this.Attributes )
-	{
-		switch ( a.toLowerCase() )
-		{
-			case 'src' :
-				targetElement.setAttribute( '_fcksavedurl', this.Attributes[a], 0 ) ;
-				/*jsl:fallthru*/ // @Packager.RemoveLine
-			default :
-				targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
-		}
-	}
-}
-
-FCKStyleDef.prototype._RemoveDuplicates = function( parent )
-{
-	for ( var i = 0 ; i < parent.childNodes.length ; i++ )
-	{
-		var oChild = parent.childNodes[i] ;
-
-		if ( oChild.nodeType != 1 )
-			continue ;
-
-		this._RemoveDuplicates( oChild ) ;
-
-		if ( this.IsEqual( oChild ) )
-			FCKTools.RemoveOuterTags( oChild ) ;
-	}
-}
-
-FCKStyleDef.prototype.IsEqual = function( e )
-{
-	if ( e.tagName != this.Element )
-		return false ;
-
-	for ( var a in this.Attributes )
-	{
-		if ( e.getAttribute( a ) != this.Attributes[a] )
-			return false ;
-	}
-
-	return true ;
-}
-
-FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
-{
-	if ( ! elementToCheck )
-		return ;
-
-	var oParent = elementToCheck.parentNode ;
-
-	if ( elementToCheck.nodeType == 1 && this.IsEqual( elementToCheck ) )
-	{
-		if ( this.IsObjectElement )
-		{
-			for ( var a in this.Attributes )
-				elementToCheck.removeAttribute( a, 0 ) ;
-			return ;
-		}
-		else
-			FCKTools.RemoveOuterTags( elementToCheck ) ;
-	}
-
-	this._RemoveMe( oParent ) ;
-}
Index: Keditor/branches/features/style/editor/_source/classes/fckstyledef_ie.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckstyledef_ie.js	(revision 765)
+++ 	(revision )
@@ -1,143 +1,0 @@
-﻿/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * FCKStyleDef Class: represents a single style definition. (IE specific)
- */
-
-FCKStyleDef.prototype.ApplyToSelection = function()
-{
-	var oSelection = FCK.ToolbarSet.CurrentInstance.EditorDocument.selection ;
-
-	if ( oSelection.type == 'Text' )
-	{
-		var oRange = oSelection.createRange() ;
-
-		// Create the main element.
-		var e = document.createElement( this.Element ) ;
-		e.innerHTML = oRange.htmlText ;
-
-		// Set the attributes.
-		this._AddAttributes( e ) ;
-
-		// Remove the duplicated elements.
-		this._RemoveDuplicates( e ) ;
-
-		// Replace the selection with the resulting HTML.
-		oRange.pasteHTML( e.outerHTML ) ;
-	}
-	else if ( oSelection.type == 'Control' )
-	{
-		var oControl = FCK.ToolbarSet.CurrentInstance.Selection.GetSelectedElement() ;
-		if ( oControl.tagName == this.Element )
-			this._AddAttributes( oControl ) ;
-	}
-}
-
-FCKStyleDef.prototype._AddAttributes = function( targetElement )
-{
-	for ( var a in this.Attributes )
-	{
-		switch ( a.toLowerCase() )
-		{
-			case 'style' :
-				targetElement.style.cssText = this.Attributes[a] ;
-				break ;
-
-			case 'class' :
-				targetElement.setAttribute( 'className', this.Attributes[a], 0 ) ;
-				break ;
-
-			case 'src' :
-				targetElement.setAttribute( '_fcksavedurl', this.Attributes[a], 0 ) ;
-				/*jsl:fallthru*/ // @Packager.RemoveLine
-			default :
-				targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
-		}
-	}
-}
-
-FCKStyleDef.prototype._RemoveDuplicates = function( parent )
-{
-	for ( var i = 0 ; i < parent.children.length ; i++ )
-	{
-		var oChild = parent.children[i] ;
-		this._RemoveDuplicates( oChild ) ;
-
-		if ( this.IsEqual( oChild ) )
-			FCKTools.RemoveOuterTags( oChild ) ;
-	}
-}
-
-FCKStyleDef.prototype.IsEqual = function( e )
-{
-	if ( e.tagName != this.Element )
-		return false ;
-
-	for ( var a in this.Attributes )
-	{
-		switch ( a.toLowerCase() )
-		{
-			case 'style' :
-				if ( e.style.cssText.toLowerCase() != this.Attributes[a].toLowerCase() )
-					return false ;
-				break ;
-			case 'class' :
-				if ( e.getAttribute( 'className', 0 ) != this.Attributes[a] )
-					return false ;
-				break ;
-			default :
-				if ( e.getAttribute( a, 0 ) != this.Attributes[a] )
-					return false ;
-		}
-	}
-
-	return true ;
-}
-
-FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
-{
-	if ( ! elementToCheck )
-		return ;
-
-	var oParent = elementToCheck.parentElement ;
-
-	if ( this.IsEqual( elementToCheck ) )
-	{
-		if ( this.IsObjectElement )
-		{
-			for ( var a in this.Attributes )
-			{
-				switch ( a.toLowerCase() )
-				{
-					case 'class' :
-						elementToCheck.removeAttribute( 'className', 0 ) ;
-						break ;
-					default :
-						elementToCheck.removeAttribute( a, 0 ) ;
-				}
-			}
-			return ;
-		}
-		else
-			FCKTools.RemoveOuterTags( elementToCheck ) ;
-	}
-
-	this._RemoveMe( oParent ) ;
-}
Index: Keditor/branches/features/style/editor/_source/classes/fckstylesloader.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckstylesloader.js	(revision 765)
+++ 	(revision )
@@ -1,88 +1,0 @@
-﻿/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * FCKStylesLoader Class: this class define objects that are responsible
- * for loading the styles defined in the XML file.
- */
-
-var FCKStylesLoader = function()
-{
-	this.Styles = new Object() ;
-	this.StyleGroups = new Object() ;
-	this.Loaded = false ;
-	this.HasObjectElements = false ;
-}
-
-FCKStylesLoader.prototype.Load = function( stylesXmlUrl )
-{
-	// Load the XML file into a FCKXml object.
-	var oXml = new FCKXml() ;
-	oXml.LoadUrl( stylesXmlUrl ) ;
-
-	// Get the "Style" nodes defined in the XML file.
-	var aStyleNodes = oXml.SelectNodes( 'Styles/Style' ) ;
-
-	// Add each style to our "Styles" collection.
-	for ( var i = 0 ; i < aStyleNodes.length ; i++ )
-	{
-		var sElement = aStyleNodes[i].attributes.getNamedItem('element').value.toUpperCase() ;
-
-		// Create the style definition object.
-		var oStyleDef = new FCKStyleDef( aStyleNodes[i].attributes.getNamedItem('name').value, sElement ) ;
-
-		if ( oStyleDef.IsObjectElement )
-			this.HasObjectElements = true ;
-
-		// Get the attributes defined for the style (if any).
-		var aAttNodes = oXml.SelectNodes( 'Attribute', aStyleNodes[i] ) ;
-
-		// Add the attributes to the style definition object.
-		for ( var j = 0 ; j < aAttNodes.length ; j++ )
-		{
-			var sAttName	= aAttNodes[j].attributes.getNamedItem('name').value ;
-			var sAttValue	= aAttNodes[j].attributes.getNamedItem('value').value ;
-
-			// IE changes the "style" attribute value when applied to an element
-			// so we must get the final resulting value (for comparison issues).
-			if ( sAttName.toLowerCase() == 'style' )
-			{
-				var oTempE = document.createElement( 'SPAN' ) ;
-				oTempE.style.cssText = sAttValue ;
-				sAttValue = oTempE.style.cssText ;
-			}
-
-			oStyleDef.AddAttribute( sAttName, sAttValue ) ;
-		}
-
-		// Add the style to the "Styles" collection using it's name as the key.
-		this.Styles[ oStyleDef.Name ] = oStyleDef ;
-
-		// Add the style to the "StyleGroups" collection.
-		var aGroup = this.StyleGroups[sElement] ;
-		if ( aGroup == null )
-		{
-			this.StyleGroups[sElement] = new Array() ;
-			aGroup = this.StyleGroups[sElement] ;
-		}
-		aGroup[aGroup.length] = oStyleDef ;
-	}
-
-	this.Loaded = true ;
-}
Index: /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontformatcombo.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontformatcombo.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontformatcombo.js	(revision 766)
@@ -41,6 +41,4 @@
 // Inherit from FCKToolbarSpecialCombo.
 FCKToolbarFontFormatCombo.prototype = new FCKToolbarStyleCombo( false ) ;
-
-FCKToolbarFontFormatCombo.prototype.TypeOf = 'FCKToolbarFontFormatCombo' ;		// @Packager.RemoveLine
 
 FCKToolbarFontFormatCombo.prototype.GetLabel = function()
Index: /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontscombo.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontscombo.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontscombo.js	(revision 766)
@@ -35,6 +35,4 @@
 FCKToolbarFontsCombo.prototype = new FCKToolbarFontFormatCombo( false ) ;
 
-FCKToolbarFontsCombo.prototype.TypeOf = 'FCKToolbarFontsCombo' ;		// @Packager.RemoveLine
-
 FCKToolbarFontsCombo.prototype.GetLabel = function()
 {
@@ -42,5 +40,5 @@
 }
 
-FCKToolbarFontFormatCombo.prototype.GetStyles = function()
+FCKToolbarFontsCombo.prototype.GetStyles = function()
 {
 	var baseStyle = FCKStyles.GetStyle( '_FCK_FontFace' ) ;
@@ -66,21 +64,28 @@
 }
 
-//FCKToolbarFontsCombo.prototype.CreateItems = function( targetSpecialCombo )
-//{
-//	var style = FCKStyles.GetStyle( '_FCK_FontFace' ) ;
+FCKToolbarFontsCombo.prototype.RefreshActiveItems = FCKToolbarStyleCombo.prototype.RefreshActiveItems ;
 
-//	var fonts = FCKConfig.FontNames.split(';') ;
+FCKToolbarFontsCombo.prototype.StyleCombo_OnBeforeClick = function( targetSpecialCombo )
+{
+	// Clear the current selection.
+	targetSpecialCombo.DeselectAll() ;
 
-//	for ( var i = 0 ; i < fonts.length ; i++ )
-//	{
-//		var fontParts = fonts[i].split('/') ;
-//		var font = fontParts[0] ;
-//		var caption = fontParts[1] || font ;
+	var startElement = FCKSelection.GetBoundaryParentElement( true ) ;
 
-//		style.SetVariable( 'Font', font ) ;
+	if ( startElement )
+	{
+		var path = new FCKElementPath( startElement ) ;
 
-//		this._Combo.AddItem( font, '<span style="font-size: 12px">' + FCKToolbarStyleCombo_BuildPreview( style, caption ) + '</span>', caption ) ;
-//	}
-//}
+		for ( var i in targetSpecialCombo.Items )
+		{
+			var item = targetSpecialCombo.Items[i] ;
+			var style = item.Style ;
 
-//FCKToolbarFontsCombo.prototype.RefreshActiveItems = FCKToolbarFontFormatCombo.prototype.RefreshActiveItems ;
+			if ( style.CheckActive( path ) )
+			{
+				targetSpecialCombo.SelectItem( item ) ;
+				return ;
+			}
+		}
+	}
+}
Index: /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontsizecombo.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontsizecombo.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarfontsizecombo.js	(revision 766)
@@ -30,10 +30,10 @@
 	
 	this.DefaultLabel = FCKConfig.DefaultFontSizeLabel || '' ;
+
+	this.FieldWidth = 70 ;
 }
 
 // Inherit from FCKToolbarSpecialCombo.
-FCKToolbarFontSizeCombo.prototype = new FCKToolbarSpecialCombo ;
-
-FCKToolbarFontSizeCombo.prototype.TypeOf = 'FCKToolbarFontSizeCombo' ;		// @Packager.RemoveLine
+FCKToolbarFontSizeCombo.prototype = new FCKToolbarFontFormatCombo( false ) ;
 
 FCKToolbarFontSizeCombo.prototype.GetLabel = function()
@@ -42,21 +42,29 @@
 }
 
-FCKToolbarFontSizeCombo.prototype.CreateItems = function( targetSpecialCombo )
+FCKToolbarFontSizeCombo.prototype.GetStyles = function()
 {
-	var style = FCKStyles.GetStyle( '_FCK_Size' ) ;
+	var baseStyle = FCKStyles.GetStyle( '_FCK_Size' ) ;
 
-	targetSpecialCombo.FieldWidth = 70 ;
+	var styles = {} ;
 
-	var sizes = FCKConfig.FontSizes.split(';') ;
+	var fonts = FCKConfig.FontSizes.split(';') ;
 
-	for ( var i = 0 ; i < sizes.length ; i++ )
+	for ( var i = 0 ; i < fonts.length ; i++ )
 	{
-		var sizeParts = sizes[i].split('/') ;
-		var size = sizeParts[0] ;
-		var caption = sizeParts[1] || size ;
+		var fontParts = fonts[i].split('/') ;
+		var font = fontParts[0] ;
+		var caption = fontParts[1] || font ;
 
-		style.SetVariable( 'Size', size ) ;
-		
-		this._Combo.AddItem( size, FCKToolbarStyleCombo_BuildPreview( style, caption ), caption ) ;
+		var style = FCKTools.CloneObject( baseStyle ) ;
+		style.SetVariable( 'Size', font ) ;
+		style.Label = caption ;
+
+		styles[ caption ] = style ;
 	}
+
+	return styles ;
 }
+
+FCKToolbarFontSizeCombo.prototype.RefreshActiveItems = FCKToolbarStyleCombo.prototype.RefreshActiveItems ;
+
+FCKToolbarFontSizeCombo.prototype.StyleCombo_OnBeforeClick = FCKToolbarFontsCombo.prototype.StyleCombo_OnBeforeClick ;
Index: /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarstylecombo.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarstylecombo.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fcktoolbarstylecombo.js	(revision 766)
@@ -37,6 +37,4 @@
 // Inherit from FCKToolbarSpecialCombo.
 FCKToolbarStyleCombo.prototype = new FCKToolbarSpecialCombo ;
-
-FCKToolbarStyleCombo.prototype.TypeOf = 'FCKToolbarStyleCombo' ;		// @Packager.RemoveLine
 
 FCKToolbarStyleCombo.prototype.GetLabel = function()
@@ -154,5 +152,5 @@
 			item.style.display = '' ;
 
-			if ( ( path && style.CheckActive( path ) ) || ( !path && style.CheckElementRemovable( startElement ) ) )
+			if ( ( path && style.CheckActive( path ) ) || ( !path && style.CheckElementRemovable( startElement, true ) ) )
 				targetSpecialCombo.SelectItem( style.Name ) ;
 		}
Index: /FCKeditor/branches/features/style/editor/_source/commandclasses/fck_othercommands.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/commandclasses/fck_othercommands.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/commandclasses/fck_othercommands.js	(revision 766)
@@ -67,50 +67,4 @@
 }
 
-// ### FontName
-
-var FCKFontNameCommand = function()
-{}
-
-FCKFontNameCommand.prototype = 
-{
-	Name : 'FontName',
-	
-	Execute : function( fontName )
-	{
-		var style = FCKStyles.GetStyle( '_FCK_FontFace' ) ;
-
-		style.SetVariable( 'Font', fontName ) ;
-
-		FCKStyles.ApplyStyle( style ) ;
-	},
-	
-	GetState : function()
-	{
-		return FCK.EditorDocument ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
-	}
-};
-
-// ### FontSize
-var FCKFontSizeCommand = function()
-{}
-
-FCKFontSizeCommand.prototype = 
-{
-	Name : 'FontSize',
-	
-	Execute : function( fontSize )
-	{
-		var style = FCKStyles.GetStyle( '_FCK_Size' ) ;
-
-		style.SetVariable( 'Size', fontSize ) ;
-
-		FCKStyles.ApplyStyle( style ) ;
-	},
-	
-	GetState : function()
-	{
-		return FCK.EditorDocument ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
-	}
-};
 
 // ### FormatBlock
@@ -128,4 +82,27 @@
 		return FCK.EditorDocument ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
 	}
+};
+
+// ### FontName
+
+var FCKFontNameCommand = function()
+{}
+
+FCKFontNameCommand.prototype = 
+{
+	Name		: 'FontName',
+	Execute		: FCKStyleCommand.prototype.Execute,
+	GetState	: FCKFormatBlockCommand.prototype.GetState
+};
+
+// ### FontSize
+var FCKFontSizeCommand = function()
+{}
+
+FCKFontSizeCommand.prototype = 
+{
+	Name		: 'FontSize',
+	Execute		: FCKStyleCommand.prototype.Execute,
+	GetState	: FCKFormatBlockCommand.prototype.GetState
 };
 
Index: /FCKeditor/branches/features/style/editor/_source/commandclasses/fcktextcolorcommand.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/commandclasses/fcktextcolorcommand.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/commandclasses/fcktextcolorcommand.js	(revision 766)
@@ -61,7 +61,11 @@
 		( FCK._ActiveColorPanelType == 'ForeColor' ? 'Color' : 'BackColor' ) ) ;
 
-	style.SetVariable( 'Color', color ) ;
-
-	FCKStyles.ApplyStyle( style ) ;
+	if ( !color || color.length == 0 )
+		FCK.Styles.RemoveStyle( style ) ;
+	else
+	{
+		style.SetVariable( 'Color', color ) ;
+		FCKStyles.ApplyStyle( style ) ;
+	}
 
 	// Delete the "cached" active panel type.
Index: /FCKeditor/branches/features/style/editor/_source/internals/fckcommands.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/internals/fckcommands.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/internals/fckcommands.js	(revision 766)
@@ -58,5 +58,5 @@
 		case 'About'		: oCommand = new FCKDialogCommand( 'About'		, FCKLang.About					, 'dialog/fck_about.html'		, 400, 330 ) ; break ;
 
-		case 'Find'			: oCommand = new FCKDialogCommand( 'Find'		, FCKLang.DlgFindTitle			, 'dialog/fck_find.html'		, 340, 170 ) ; break ;
+		case 'Find'			: oCommand = new FCKDialogCommand( 'Find'		, FCKLang.DlgFindTitle			, 'dialog/fck_find.html'		, 340, 170, FCKCommands.GetBooleanState, FCKBrowserInfo.IsOpera ) ; break ;
 		case 'Replace'		: oCommand = new FCKDialogCommand( 'Replace'	, FCKLang.DlgReplaceTitle		, 'dialog/fck_replace.html'		, 340, 200 ) ; break ;
 
@@ -152,2 +152,8 @@
 	return FCKConfig.FullPage ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
 }
+
+
+FCKCommands.GetBooleanState = function( isDisabled )
+{
+	return isDisabled ? FCK_TRISTATE_DISABLED : FCK_TRISTATE_OFF ;
+}
Index: /FCKeditor/branches/features/style/editor/_source/internals/fckdomtools.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/internals/fckdomtools.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/internals/fckdomtools.js	(revision 766)
@@ -412,5 +412,5 @@
 		
 		if ( typeof att == 'string' )
-			element.attributes[ att ] ;
+			att = element.attributes[ att ] ;
 		else
 			attName = att.nodeName ;
Index: /FCKeditor/branches/features/style/editor/_source/internals/fckstyles.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/internals/fckstyles.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/internals/fckstyles.js	(revision 766)
@@ -34,5 +34,9 @@
 		if ( style )
 		{
-			style.ApplyToSelection( FCK.EditorWindow ) ;
+			if ( style.GetType() == FCK_STYLE_OBJECT )
+				style.ApplyToObject( FCKSelection.GetSelectedElement() ) ;
+			else
+				style.ApplyToSelection( FCK.EditorWindow ) ;
+	
 			FCK.Events.FireEvent( 'OnSelectionChange' ) ;
 		}
@@ -226,7 +230,8 @@
 		if ( !styles )
 		{
-			styles = this._LoadStylesCore() ;
-			styles = FCKTools.Merge( styles, this._LoadStylesXml() ) ;
-			this._GetStyles = styles ;
+			styles = this._GetStyles = FCKTools.Merge( 
+				this._LoadStylesCore(),
+				this._LoadStylesCustom(),
+				this._LoadStylesXml() ) ;
 		}
 		return styles ;
@@ -249,4 +254,18 @@
 			style.IsCore = true ;
 		}
+		return styles ;
+	},
+
+	_LoadStylesCustom : function()
+	{
+		var styles = {};
+		var styleDefs = FCKConfig.CustomStyles ;
+
+		if ( styleDefs )
+		{
+			for ( var styleName in styleDefs )
+				styles[ styleName ] = new FCKStyle( styleDefs[ styleName ] ) ;
+		}
+
 		return styles ;
 	},
Index: /FCKeditor/branches/features/style/editor/_source/internals/fcktablehandler.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/internals/fcktablehandler.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/_source/internals/fcktablehandler.js	(revision 766)
@@ -131,5 +131,5 @@
 		oCell = oRow.cells[iIndex].cloneNode(false) ;
 
-		if ( FCKBrowserInfo.IsGecko )
+		if ( FCKBrowserInfo.IsGeckoLike )
 			oCell.innerHTML = GECKO_BOGUS ;
 
@@ -202,7 +202,6 @@
 	// Create the new cell element to be added.
 	var oNewCell = FCK.EditorDocument.createElement( 'TD' ) ;
-	if ( FCKBrowserInfo.IsGecko )
+	if ( FCKBrowserInfo.IsGeckoLike )
 		oNewCell.innerHTML = GECKO_BOGUS ;
-	//	oNewCell.innerHTML = "&nbsp;" ;
 
 	if ( !insertBefore && oCell.cellIndex == oCell.parentNode.cells.length - 1 )
@@ -395,5 +394,5 @@
 	refCell.appendChild( cellContents ) ;
 	
-	if ( FCKBrowserInfo.IsGecko && ( ! refCell.firstChild ) )
+	if ( FCKBrowserInfo.IsGeckoLike && ( ! refCell.firstChild ) )
 		FCKTools.AppendBogusBr( refCell ) ;
 
@@ -463,5 +462,5 @@
 		var newCellSpan = Math.ceil( cellSpan / 2 ) ;
 		var newCell = refCell.ownerDocument.createElement( 'td' ) ;
-		if ( FCKBrowserInfo.IsGecko )
+		if ( FCKBrowserInfo.IsGeckoLike )
 			FCKTools.AppendBogusBr( newCell ) ;
 		var startIdx = colIdx + newCellSpan ;
@@ -491,5 +490,5 @@
 				newRow.push( refCell ) ;
 				newRow.push( refCell.ownerDocument.createElement( 'td' ) ) ;
-				if ( FCKBrowserInfo.IsGecko )
+				if ( FCKBrowserInfo.IsGeckoLike )
 					FCKTools.AppendBogusBr( newRow[newRow.length - 1] ) ;
 			}
@@ -543,5 +542,5 @@
 		var newCell = FCK.EditorDocument.createElement( 'td' ) ;
 		newCell.rowSpan = Math.floor( currentRowSpan / 2 ) ;
-		if ( FCKBrowserInfo.IsGecko )
+		if ( FCKBrowserInfo.IsGeckoLike )
 			FCKTools.AppendBogusBr( newCell ) ;
 		currentCell.parentNode.parentNode.rows[newCellRowIndex].insertBefore( newCell, insertMarker ) ;
@@ -574,5 +573,5 @@
 		// 3. Insert a new cell to new row.
 		var newCell = FCK.EditorDocument.createElement( 'td' ) ;
-		if ( FCKBrowserInfo.IsGecko )
+		if ( FCKBrowserInfo.IsGeckoLike )
 			FCKTools.AppendBogusBr( newCell	) ;
 		newRow.appendChild( newCell ) ;
@@ -793,5 +792,5 @@
 	for ( var i = 0 ; i < aCells.length ; i++ )
 	{
-		if ( FCKBrowserInfo.IsGecko )
+		if ( FCKBrowserInfo.IsGeckoLike )
 			aCells[i].innerHTML = GECKO_BOGUS ;
 		else
Index: /FCKeditor/branches/features/style/editor/dialog/common/fck_dialog_common.js
===================================================================
--- /FCKeditor/branches/features/style/editor/dialog/common/fck_dialog_common.js	(revision 765)
+++ /FCKeditor/branches/features/style/editor/dialog/common/fck_dialog_common.js	(revision 766)
@@ -60,4 +60,10 @@
 }
 
+var KeyIdentifierMap = 
+{
+	Left	: 37,
+	Right	: 39
+} 
+
 // Functions used by text fields to accept numbers only.
 function IsDigit( e )
@@ -67,4 +73,7 @@
 
 	var iCode = ( e.keyCode || e.charCode ) ;
+	
+	if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) ) 
+			iCode = KeyIdentifierMap[ e.keyIdentifier ] ;
 
 	return (
@@ -73,4 +82,5 @@
 			|| iCode == 8						// Backspace
 			|| iCode == 46						// Delete
+			|| iCode == 9						// Tab
 	) ;
 }
Index: /FCKeditor/branches/features/style/editor/dialog/fck_table.html
===================================================================
--- /FCKeditor/branches/features/style/editor/dialog/fck_table.html	(revision 765)
+++ /FCKeditor/branches/features/style/editor/dialog/fck_table.html	(revision 766)
@@ -84,5 +84,6 @@
 //		document.getElementById('cmbFontStyle').value	= table.className ;
 
-		if (table.caption) document.getElementById('txtCaption').value = table.caption.innerHTML ;
+		var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ;
+		if ( eCaption ) document.getElementById('txtCaption').value = eCaption.innerHTML ;
 
 		document.getElementById('txtRows').disabled    = true ;
Index: /FCKeditor/branches/features/style/editor/fckeditor.html
===================================================================
--- /FCKeditor/branches/features/style/editor/fckeditor.html	(revision 765)
+++ /FCKeditor/branches/features/style/editor/fckeditor.html	(revision 766)
@@ -105,7 +105,4 @@
 LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
 LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
-LoadScript( '_source/classes/fckstyledef.js' ) ;
-LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ;
-LoadScript( '_source/classes/fckstylesloader.js' ) ;
 
 LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
Index: /FCKeditor/branches/features/style/editor/filemanager/connectors/php/commands.php
===================================================================
--- /FCKeditor/branches/features/style/editor/filemanager/connectors/php/commands.php	(revision 765)
+++ /FCKeditor/branches/features/style/editor/filemanager/connectors/php/commands.php	(revision 766)
@@ -71,5 +71,8 @@
 			else
 			{
-				$iFileSize = filesize( $sServerDir . $sFile ) ;
+				$iFileSize = @filesize( $sServerDir . $sFile ) ;
+				if ( !$iFileSize ) {
+					$iFileSize = 0 ;
+				}
 				if ( $iFileSize > 0 )
 				{
Index: /FCKeditor/branches/features/style/editor/filemanager/connectors/php/util.php
===================================================================
--- /FCKeditor/branches/features/style/editor/filemanager/connectors/php/util.php	(revision 765)
+++ /FCKeditor/branches/features/style/editor/filemanager/connectors/php/util.php	(revision 766)
@@ -37,5 +37,21 @@
 function ConvertToXmlAttribute( $value )
 {
-	return ( htmlspecialchars( $value ) ) ;
+	if ( defined( 'PHP_OS' ) ) 
+	{
+		$os = PHP_OS ;
+	}
+	else
+	{
+		$os = php_uname() ;
+	}
+	
+	if ( strtoupper( substr( $os, 0, 3 ) ) === 'WIN' ) 
+	{
+		return ( utf8_encode( htmlspecialchars( $value ) ) ) ;
+	} 
+	else 
+	{
+		return ( htmlspecialchars( $value ) ) ;
+	}	
 }
 
Index: /FCKeditor/branches/features/style/fckconfig.js
===================================================================
--- /FCKeditor/branches/features/style/fckconfig.js	(revision 765)
+++ /FCKeditor/branches/features/style/fckconfig.js	(revision 766)
@@ -189,4 +189,9 @@
 FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
 
+FCKConfig.CustomStyles = 
+{
+	'Red Title'	: { Element : 'h3', Styles : { 'color' : 'Red' } }
+};
+
 // Do not add, rename or remove styles here. Only apply definition changes.
 FCKConfig.CoreStyles = 
@@ -213,7 +218,25 @@
 	
 	// Other formatting features.
-	'FontFace'		: { Element : 'span', Styles : { 'font-family' : '#("Font")' } },
-	'Size'			: { Element : 'span', Styles : { 'font-size' : '#("Size","fontSize")' } },
-	'Color'			: { Element : 'span', Styles : { 'color' : '#("Color","color")' } },
+	'FontFace' : 
+	{ 
+		Element		: 'span', 
+		Styles		: { 'font-family' : '#("Font")' }, 
+		Overrides	: [ { Element : 'font', Attributes : { 'face' : null } } ]
+	},
+	
+	'Size' :
+	{ 
+		Element		: 'span', 
+		Styles		: { 'font-size' : '#("Size","fontSize")' }, 
+		Overrides	: [ { Element : 'font', Attributes : { 'size' : null } } ]
+	},
+	
+	'Color' :
+	{ 
+		Element		: 'span', 
+		Styles		: { 'color' : '#("Color","color")' }, 
+		Overrides	: [ { Element : 'font', Attributes : { 'color' : null } } ]
+	},
+	
 	'BackColor'		: { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } }
 };
Index: /FCKeditor/branches/features/style/fckpackager.xml
===================================================================
--- /FCKeditor/branches/features/style/fckpackager.xml	(revision 765)
+++ /FCKeditor/branches/features/style/fckpackager.xml	(revision 766)
@@ -96,4 +96,8 @@
 		<File path="editor/_source/classes/fckkeystrokehandler.js" />
 
+		<File path="editor/dtd/fck_xhtml10transitional.js" />
+		<File path="editor/_source/classes/fckstyle.js" />
+		<File path="editor/_source/internals/fckstyles.js" />
+			  
 		<File path="editor/_source/internals/fcklisthandler.js" />
 		<File path="editor/_source/classes/fckelementpath.js" />
@@ -111,9 +115,7 @@
 		<File path="editor/_source/internals/fcktablehandler_ie.js" />
 		<File path="editor/_source/classes/fckxml_ie.js" />
-		<File path="editor/_source/classes/fckstyledef.js" />
-		<File path="editor/_source/classes/fckstyledef_ie.js" />
-		<File path="editor/_source/classes/fckstylesloader.js" />
 
 		<File path="editor/_source/commandclasses/fcknamedcommand.js" />
+		<File path="editor/_source/commandclasses/fckstylecommand.js" />
 		<File path="editor/_source/commandclasses/fck_othercommands.js" />
 		<File path="editor/_source/commandclasses/fckshowblocks.js" />
@@ -123,7 +125,8 @@
 		<File path="editor/_source/commandclasses/fckpastewordcommand.js" />
 		<File path="editor/_source/commandclasses/fcktablecommand.js" />
-		<File path="editor/_source/commandclasses/fckstylecommand.js" />
 		<File path="editor/_source/commandclasses/fckfitwindow.js" />
 		<File path="editor/_source/commandclasses/fcklistcommands.js" />
+		<File path="editor/_source/commandclasses/fckcorestylecommand.js" />
+		<File path="editor/_source/commandclasses/fckremoveformatcommand.js" />
 		<File path="editor/_source/internals/fckcommands.js" />
 
@@ -134,8 +137,8 @@
 		<File path="editor/_source/classes/fckspecialcombo.js" />
 		<File path="editor/_source/classes/fcktoolbarspecialcombo.js" />
+		<File path="editor/_source/classes/fcktoolbarstylecombo.js" />
+		<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" />
 		<File path="editor/_source/classes/fcktoolbarfontscombo.js" />
 		<File path="editor/_source/classes/fcktoolbarfontsizecombo.js" />
-		<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" />
-		<File path="editor/_source/classes/fcktoolbarstylecombo.js" />
 		<File path="editor/_source/classes/fcktoolbarpanelbutton.js" />
 		<File path="editor/_source/internals/fcktoolbaritems.js" />
@@ -184,4 +187,8 @@
 		<File path="editor/_source/classes/fckkeystrokehandler.js" />
 
+		<File path="editor/dtd/fck_xhtml10transitional.js" />
+		<File path="editor/_source/classes/fckstyle.js" />
+		<File path="editor/_source/internals/fckstyles.js" />
+
 		<File path="editor/_source/internals/fcklisthandler.js" />
 		<File path="editor/_source/classes/fckelementpath.js" />
@@ -199,9 +206,7 @@
 		<File path="editor/_source/internals/fcktablehandler_gecko.js" />
 		<File path="editor/_source/classes/fckxml_gecko.js" />
-		<File path="editor/_source/classes/fckstyledef.js" />
-		<File path="editor/_source/classes/fckstyledef_gecko.js" />
-		<File path="editor/_source/classes/fckstylesloader.js" />
 
 		<File path="editor/_source/commandclasses/fcknamedcommand.js" />
+		<File path="editor/_source/commandclasses/fckstylecommand.js" />
 		<File path="editor/_source/commandclasses/fck_othercommands.js" />
 		<File path="editor/_source/commandclasses/fckshowblocks.js" />
@@ -211,7 +216,8 @@
 		<File path="editor/_source/commandclasses/fckpastewordcommand.js" />
 		<File path="editor/_source/commandclasses/fcktablecommand.js" />
-		<File path="editor/_source/commandclasses/fckstylecommand.js" />
 		<File path="editor/_source/commandclasses/fckfitwindow.js" />
 		<File path="editor/_source/commandclasses/fcklistcommands.js" />
+		<File path="editor/_source/commandclasses/fckcorestylecommand.js" />
+		<File path="editor/_source/commandclasses/fckremoveformatcommand.js" />
 		<File path="editor/_source/internals/fckcommands.js" />
 
@@ -222,8 +228,8 @@
 		<File path="editor/_source/classes/fckspecialcombo.js" />
 		<File path="editor/_source/classes/fcktoolbarspecialcombo.js" />
+		<File path="editor/_source/classes/fcktoolbarstylecombo.js" />
+		<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" />
 		<File path="editor/_source/classes/fcktoolbarfontscombo.js" />
 		<File path="editor/_source/classes/fcktoolbarfontsizecombo.js" />
-		<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" />
-		<File path="editor/_source/classes/fcktoolbarstylecombo.js" />
 		<File path="editor/_source/classes/fcktoolbarpanelbutton.js" />
 		<File path="editor/_source/internals/fcktoolbaritems.js" />
Index: /FCKeditor/branches/features/style/fckstyles.xml
===================================================================
--- /FCKeditor/branches/features/style/fckstyles.xml	(revision 765)
+++ /FCKeditor/branches/features/style/fckstyles.xml	(revision 766)
@@ -26,9 +26,10 @@
 -->
 <Styles>
+
 	<!-- Block Styles -->
 
 	<!--
 	# These styles are already available in the "Format" combo, so they are not
-	# needed here.
+	# needed here by default.
 
 	<Style name="Heading 1" element="h1" />
@@ -56,4 +57,11 @@
 	<Style name="Superscript" element="sup" />
 	-->
+
+	<Style name="Marker: Yellow" element="span">
+		<Style name="background-color" value="Yellow" />
+	</Style>
+	<Style name="Marker: Green" element="span">
+		<Style name="background-color" value="Lime" />
+	</Style>
 
 	<Style name="Strong Emphasis" element="strong" />
