Index: /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.body.php
===================================================================
--- /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.body.php	(revision 1033)
+++ /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.body.php	(revision 1034)
@@ -206,13 +206,36 @@
 	if ( document.getElementById('wpTextbox1') )
 	{
+		var height = $wgFCKEditorHeight ;
+		
+		if ( height == 0 )
+        {
+			// Get the window (inner) size.
+			var height = window.innerHeight || ( document.documentElement && document.documentElement.clientHeight ) || 550 ;
+			
+			// Reduce the height to the offset of the toolbar.
+			var offset = document.getElementById('toolbar') ;
+			while ( offset )
+			{
+				height -= offset.offsetTop ;
+				offset = offset.offsetParent ;
+			}
+			
+			// Add a small space to be left in the bottom.
+			height -= 20 ;
+		}
+
+		// Enforce a minimum height.
+		height = ( !height || height < 300 ) ? 300 : height ;
+		
+		// Create the editor instance and replace the textarea.
 		var oFCKeditor = new FCKeditor('wpTextbox1') ;
 		oFCKeditor.BasePath = '$wgScriptPath/$wgFCKEditorDir/' ;
 		oFCKeditor.Config['CustomConfigurationsPath'] = '$wgScriptPath/$wgFCKEditorExtDir/fckeditor_config.js' ;
-		//oFCKeditor.Config['EditorAreaCSS'] = sEditorAreaCSS;        
-		//oFCKeditor.Config['EditorAreaCSS'] = "$wgScriptPath/skins/$wgDefaultSkin/allinone.css";        
-		oFCKeditor.Config['EditorAreaCSS'] = "$wgScriptPath/$wgFCKEditorExtDir/css/fckeditor.css";
-		oFCKeditor.Height = '$wgFCKEditorHeight' ;
+		oFCKeditor.Config['EditorAreaCSS'] = "$wgScriptPath/$wgFCKEditorExtDir/css/fckeditor.css" ;
+		oFCKeditor.Height = height ;
 		oFCKeditor.ToolbarSet = '$wgFCKEditorToolbarSet' ;
 		oFCKeditor.ReplaceTextarea() ;
+		
+		// Hide the default toolbar.
 		document.getElementById('toolbar').style.cssText = 'display:none;' ;
 	}
Index: /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.php
===================================================================
--- /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.php	(revision 1033)
+++ /MediaWiki/trunk/extensions/FCKeditor/FCKeditor.php	(revision 1034)
@@ -38,5 +38,5 @@
 $wgFCKEditorDir          = "extensions/FCKeditor/fckeditor";
 $wgFCKEditorToolbarSet   = "Wiki";
-$wgFCKEditorHeight       = "600";
+$wgFCKEditorHeight       = "0";		// "0" for automatic ("300" minimum).
 
 /**
