Index: /FCKeditor/trunk/editor/_source/commandclasses/fckjustifycommands.js
===================================================================
--- /FCKeditor/trunk/editor/_source/commandclasses/fckjustifycommands.js	(revision 967)
+++ /FCKeditor/trunk/editor/_source/commandclasses/fckjustifycommands.js	(revision 968)
@@ -30,4 +30,30 @@
 	this.IsDefaultAlign = ( alignValue == 'left' && contentDir == 'ltr' ) ||
 						  ( alignValue == 'right' && contentDir == 'rtl' ) ;
+
+
+
+	// Get the class name to be used by this instance.
+	var cssClassName = this._CssClassName = ( function()
+	{
+		var classes = FCKConfig.JustifyClasses ;
+		if ( classes )
+		{
+			switch ( alignValue )
+			{
+				case 'left' :
+					return classes[0] ;
+				case 'center' :
+					return classes[1] ;
+				case 'right' :
+					return classes[2] ;
+				case 'justify' :
+					return classes[3] ;
+			}
+		}
+		return null ;
+	} )() ;
+
+	if ( cssClassName && cssClassName.length > 0 )
+		this._CssClassRegex = new RegExp( '(?:^|\\s+)' + cssClassName + '(?=$|\\s)' ) ;
 }
 
@@ -76,4 +102,6 @@
 		// change the DOM tree and break selections.
 		var bookmark = range.CreateBookmark() ;
+		
+		var cssClassName = this._CssClassName ;
 
 		// Apply alignment setting for each paragraph.
