Index: fckpackager.php
===================================================================
--- fckpackager.php	(revision 1446)
+++ fckpackager.php	(working copy)
@@ -493,10 +493,21 @@
 			echo '    Adding ' . basename( $file ) . "\n" ;
 
 			// Compress (if needed) and process its contents.
-			if ( $this->CompactJavaScript )
-				$outputData .= FCKJavaScriptCompressor::Compress( FCKPreProcessor::Process( $data ), $this->ConstantsProcessor ) ;
+			if ( preg_match( '/\.js$/', $file ) )
+			{
+				if ( $this->CompactJavaScript )
+					$outputData .= FCKJavaScriptCompressor::Compress( FCKPreProcessor::Process( $data ), $this->ConstantsProcessor ) ;
+				else
+					$outputData .= FCKPreProcessor::Process( $data ) ;
+			}
+			else if ( preg_match( '/\.css$/', $file ) )
+			{
+				$outputData .= FCKCSSProcessor::Process( $data, $file ) ;
+			}
 			else
-				$outputData .= FCKPreProcessor::Process( $data ) ;
+			{
+				echo "    Unknown file type, not added!\n";
+			}
 
 			// Each file terminates with a CRLF, even if compressed.
 			$outputData .= "\r\n" ;
@@ -659,7 +670,19 @@
 ?>
 <?php
 
+class FCKCSSProcessor
+{
+	function FCKCSSProcessor( )
+	{ }
 
+	// Intended to be static
+	function Process( $data, $filename )
+	{
+		$def = "FCKCSSManager.AddCachedCSS(" . json_encode( str_replace( 'editor/', '', $filename ) )  . ",". json_encode( $data ) .");" ;
+		return $def ;
+	}
+}
+
 class FCKPreProcessor
 {
 	function FCKPreProcessor()
