Index: /FCKeditor/trunk/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 522)
+++ /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 523)
@@ -223,5 +223,5 @@
 		// Call the Data Processor to generate the output data.
 		var data = FCK.DataProcessor.ConvertToDataFormat(
-			isFullPage ? oDoc.getElementsByTagName( 'html' )[0] : oDoc.body,
+			isFullPage ? oDoc.documentElement : oDoc.body,
 			!isFullPage,
 			FCKConfig.IgnoreEmptyParagraphValue,
Index: /FCKeditor/trunk/editor/_source/internals/fckxhtml.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckxhtml.js	(revision 522)
+++ /FCKeditor/trunk/editor/_source/internals/fckxhtml.js	(revision 523)
@@ -392,4 +392,20 @@
 	},
 
+	pre : function ( node, htmlNode)
+	{
+		for ( var i = 0 ; i < htmlNode.childNodes.length ; i++ )
+		{
+			var item = htmlNode.childNodes[i] ;
+			var val = item.nodeValue ;
+			if ( i == 0 )
+				val = "\r\n" + val ;
+			if ( item.nodeType == 3 )
+				node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( val ) ) ) ;
+			else
+				FCKXHtml._AppendNode( node, item ) ;
+		}
+		return node ;
+	},
+
 	title : function( node, htmlNode )
 	{
