Index: _source/plugins/wysiwygarea/plugin.js
===================================================================
--- _source/plugins/wysiwygarea/plugin.js	(revision 5859)
+++ _source/plugins/wysiwygarea/plugin.js	(revision )
@@ -36,7 +36,8 @@
 			if ( checkReadOnly( selection ) )
 				return;
 
-			var data = evt.data;
+			var range,
+				data = evt.data;
 			this.fire( 'saveSnapshot' );
 
 			if ( this.dataProcessor )
@@ -60,7 +61,7 @@
 					// (#6005), we need to make some checks and eventually
 					// delete the selection first.
 
-					var range = selection.getRanges()[0],
+					range = selection.getRanges()[0],
 						endContainer = range && range.endContainer;
 
 					if ( endContainer &&
@@ -82,6 +83,21 @@
 				if ( selIsLocked )
 					this.getSelection().lock();
 			}
+			// Firefox breaks format when pasting using execCommand-inserthtml (#5536).
+			else if ( CKEDITOR.env.gecko )
+			{
+				range = this.document.getSelection().getRanges()[ 0 ];
+				// Clean selection.
+				range.extractContents();
+				var target = range.createBookmark().startNode;
+				var container = new CKEDITOR.dom.element( 'div', this.document );
+				container.setHtml( data );
+
+				while( container.getChildCount() )
+					target.insertBeforeMe( container.getChild( 0 ) );
+
+				target.remove();
+			}
 			else
 				this.document.$.execCommand( 'inserthtml', false, data );
 
