Index: _whatsnew.html
===================================================================
--- _whatsnew.html	(revision 1641)
+++ _whatsnew.html	(working copy)
@@ -177,6 +177,9 @@
 			settings.</li>
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1868">#1868</a>] Links
 			to file browser has been changed to avoid requests containing double dots.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1229">#1229</a>] Converting
+			multiple contiguous paragraphs to Formatted will now be merged into a single 
+			&lt;PRE&gt; block.</li>
 	</ul>
 	<p>
 		<a href="_whatsnew_history.html">See previous versions history</a>
Index: editor/_source/classes/fckstyle.js
===================================================================
--- editor/_source/classes/fckstyle.js	(revision 1641)
+++ editor/_source/classes/fckstyle.js	(working copy)
@@ -817,7 +817,7 @@
 					value = '\n' ;
 				results.push( value ) ;
 			} ) ;
-
+		
 		// Assigning innerHTML to <PRE> in IE causes all linebreaks to be reduced to spaces.
 		// Assigning outerHTML to <PRE> in IE doesn't work if the <PRE> isn't contained in another node
 		// since the node reference is changed after outerHTML assignment.
@@ -855,6 +855,9 @@
 		var block ;
 		var doc = range.Window.document ;
 
+		var preBlocks = [] ;
+		var convertedPreBlocks = [] ;
+
 		while( ( block = iterator.GetNextParagraph() ) )		// Only one =
 		{
 			// Create the new node right before the current one.
@@ -864,9 +867,15 @@
 			var newBlockIsPre = newBlock.nodeName.IEquals( 'pre' ) ;
 			var blockIsPre = block.nodeName.IEquals( 'pre' ) ;
 			if ( newBlockIsPre && !blockIsPre )
+			{
 				newBlock = this._ToPre( doc, block, newBlock ) ;
+				preBlocks.push( newBlock ) ;
+			}
 			else if ( !newBlockIsPre && blockIsPre )
+			{
 				newBlock = this._FromPre( doc, block, newBlock ) ;
+				convertedPreBlocks.push( newBlock ) ;
+			}
 			else	// Convering from a regular block to another regular block.
 				FCKDomTools.MoveChildren( block, newBlock ) ;
 
@@ -875,6 +884,48 @@
 			FCKDomTools.RemoveNode( block ) ;
 		}
 
+		// Merge adjacent <PRE> blocks for #1229.
+		for ( var i = 0 ; i < preBlocks.length - 1 ; i++ )
+		{
+			// Check if the next block in HTML equals the next <PRE> block generated.
+			if ( FCKDomTools.GetNextSourceElement( preBlocks[i], true, [], [], true ) != preBlocks[i+1] )
+				continue ;
+
+			// Merge the upper <PRE> block's content into the lower <PRE> block.
+			// Remove the upper <PRE> block.
+			preBlocks[i+1].innerHTML = preBlocks[i].innerHTML + '\n\n' + preBlocks[i+1].innerHTML ;
+			FCKDomTools.RemoveNode( preBlocks[i] ) ;
+		}
+
+		// Split converted <PRE> blocks for #1229.
+		for ( var i = 0 ; i < convertedPreBlocks.length ; i++ )
+		{
+			var currentBlock = convertedPreBlocks[i] ;
+			var lastNewBlock = null ;
+			for ( var j = 0 ; j < currentBlock.childNodes.length ; j++ )
+			{
+				var cursor = currentBlock.childNodes[j] ;
+
+				// If we have two <BR>s, and they're not at the beginning or the end,
+				// then we'll split up the contents following them into another block.
+				if ( cursor.nodeName.IEquals( 'br' ) && j != 0 && j != currentBlock.childNodes.length - 2
+						&& cursor.nextSibling && cursor.nextSibling.nodeName.IEquals( 'br' ) )
+				{
+					FCKDomTools.RemoveNode( cursor.nextSibling ) ;
+					FCKDomTools.RemoveNode( cursor ) ;
+					j-- ;	// restart at current index at next iteration
+					lastNewBlock = FCKDomTools.InsertAfterNode( lastNewBlock || currentBlock, doc.createElement( currentBlock.nodeName ) ) ;
+					continue ;
+				}
+
+				if ( lastNewBlock )
+				{
+					FCKDomTools.MoveNode( cursor, lastNewBlock ) ;
+					j-- ;	// restart at current index at next iteration
+				}
+			}
+		}
+
 		// Re-select the original range.
 		if ( selectIt )
 			range.SelectBookmark( bookmark ) ;
