Index: /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.body.php
===================================================================
--- /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.body.php	(revision 541)
+++ /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.body.php	(revision 542)
@@ -258,4 +258,6 @@
         global $wgStylePath, $wgStyleVersion;
         
+        print "ONEDIT!!!!!";
+        
         $options = new FCKeditorParserOptions();
         $options->setTidy(true);
@@ -263,12 +265,5 @@
         $parser->setOutputType(OT_HTML);
         $form->textbox1 = $parser->parse($form->textbox1, $wgTitle, $options)->getText();
-        
-        $EditorAreaCSS = " ";
-        $EditorAreaCSS .= "";
-        $EditorAreaCSS .= "";
-        $EditorAreaCSS .= "";
-        $EditorAreaCSS .= "";
-        $EditorAreaCSS .= "";
-        
+                
         if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' )) {
             return true;
@@ -281,4 +276,15 @@
 		$printsheet = htmlspecialchars( "$wgStylePath/common/wikiprintable.css?$wgStyleVersion" );		
 		
+		//CSS trick,  we need to get user CSS stylesheets somehow... it must be done in a different way!
+		$skin = $wgUser->getSkin();
+		$skin->loggedin = $wgUser->isLoggedIn();
+		$skin->mTitle =& $wgTitle;
+		$skin->skinname = 'monobook';
+		$skin->userpage = $wgUser->getUserPage()->getPrefixedText();
+		$skin->setupUserCss();
+		
+		preg_match_all('/@import "([^"]+)";/', $skin->usercss, $matches);
+        $userStyles = $matches[1];
+        //End of CSS trick
         
         $script = <<<HEREDOC
@@ -292,5 +298,14 @@
 <!--[if IE 7]><script type="text/javascript">sEditorAreaCSS += ',/mediawiki/skins/monobook/IE70Fixes.css?{$wgStyleVersion}'; </script><![endif]-->
 <!--[if lt IE 7]><script type="text/javascript">sEditorAreaCSS += ',/mediawiki/skins/monobook/IEFixes.css?{$wgStyleVersion}'; </script><![endif]-->
-
+HEREDOC;
+
+        if (!is_null($userStyles) && !empty($userStyles)) {
+            $script .= '
+<script type="text/javascript"> 
+sEditorAreaCSS += ",'.implode(',', $userStyles).'";
+</script>';
+        }
+        
+        $script .= <<<HEREDOC
 <script type="text/javascript"> 
 function onLoadFCKeditor()
@@ -301,11 +316,9 @@
 		oFCKeditor.BasePath = '$wgScriptPath/$wgFCKEditorDir/' ;
 		oFCKeditor.Config['CustomConfigurationsPath'] = '$wgScriptPath/$wgFCKEditorExtDir/fckeditor_config.js' ;
-		//oFCKeditor.Config['EditorAreaCSS'] = sEditorAreaCSS;        
-		//oFCKeditor.Config['EditorAreaCSS'] = '/mediawiki/allinone.css?{$wgStyleVersion}';
+		oFCKeditor.Config['EditorAreaCSS'] = sEditorAreaCSS;        
 		oFCKeditor.Height = '$wgFCKEditorHeight' ;
 		oFCKeditor.ToolbarSet = '$wgFCKEditorToolbarSet' ;
 		oFCKeditor.ReplaceTextarea() ;
 		document.getElementById('toolbar').style.cssText = 'display:none;' ;
-	    //alert(oFCKeditor.Config['EditorAreaCSS']);
 	}
 }
