Index: /CKEditor/branches/features/pasting/_source/core/htmlparser/filter.js
===================================================================
--- /CKEditor/branches/features/pasting/_source/core/htmlparser/filter.js	(revision 4206)
+++ /CKEditor/branches/features/pasting/_source/core/htmlparser/filter.js	(revision 4207)
@@ -112,4 +112,12 @@
 
 				return value;
+			},
+
+			clone : function()
+			{
+				var clone = new CKEDITOR.htmlParser.filter();
+				// Shallow copy all the rules.
+				clone._ = CKEDITOR.tools.clone( this._ );
+				return clone;
 			}
 		}
Index: /CKEditor/branches/features/pasting/_source/plugins/clipboard/dialogs/paste.js
===================================================================
--- /CKEditor/branches/features/pasting/_source/plugins/clipboard/dialogs/paste.js	(revision 4206)
+++ /CKEditor/branches/features/pasting/_source/plugins/clipboard/dialogs/paste.js	(revision 4207)
@@ -119,5 +119,5 @@
 
 			setTimeout( function(){
-				editor.insertHtml( html );
+				editor.fire( 'paste', { 'html' : html } );
 			}, 0 );
 
Index: /CKEditor/branches/features/pasting/_source/plugins/clipboard/plugin.js
===================================================================
--- /CKEditor/branches/features/pasting/_source/plugins/clipboard/plugin.js	(revision 4206)
+++ /CKEditor/branches/features/pasting/_source/plugins/clipboard/plugin.js	(revision 4207)
@@ -131,9 +131,4 @@
 						 || CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 )
 					editor.document.getBody().fire( 'paste' );
-					
-				setTimeout( function()
-					{
-						editor.fire( 'saveSnapshot' );		// Save after paste
-					}, 0 );
 				return;
 
@@ -223,11 +218,43 @@
 	CKEDITOR.plugins.add( 'clipboard',
 		{
+			requires : [ 'htmldataprocessor' ],
 			init : function( editor )
 			{
-				// Provide default 'html' paste handler. 
+				// The paste processor here is just a reduced copy of html data processor.
+				CKEDITOR.pasteProcessor = function( editor )
+				{
+					this.editor = editor;
+					this.dataFilter = this.editor.dataProcessor.dataFilter.clone();
+				};
+				CKEDITOR.pasteProcessor.prototype =
+				{
+					toHtml : CKEDITOR.htmlDataProcessor.prototype.toHtml
+				};
+
+				// The very first handler which initialize the processor.
 				editor.on( 'paste', function( evt )
 				{
-					editor.insertHtml( evt.data[ 'html' ] );
-				} );
+					// The processor is a transient instance life cycled to the
+					// 'paste' event since the processing rules will be added
+					// on demand accordingly to clipboard data flavor.
+					editor.pasteProcessor = new CKEDITOR.pasteProcessor( editor );
+					
+				}, null, null, 1 );
+
+				// The very last handler which insert final data into the editor at the end of the chain.
+				editor.on( 'paste', function( evt )
+				{
+					var data = evt.data;
+
+					if ( data[ 'html'] )
+						editor.insertHtml(editor.pasteProcessor.toHtml(data[ 'html' ], false));
+					else if ( data[ 'text'] )
+						editor.insertText(data[ 'text' ]);
+
+					delete editor.pasteProcessor;
+
+					editor.fire( 'saveSnapshot' ); // Save after inserted.
+
+				}, null, null, 1000 );
 
 				function addButtonCommand( buttonName, commandName, command, ctxMenuOrder )
@@ -278,5 +305,4 @@
 								
 								editor.fire( 'paste', dataTransfer );
-								editor.fire( 'saveSnapshot' );		// Save after paste
 							} );
 						} );
@@ -305,4 +331,6 @@
 			}
 		});
+
+
 })();
 
Index: /CKEditor/branches/features/pasting/_source/plugins/pastefromword/dialogs/pastefromword.js
===================================================================
--- /CKEditor/branches/features/pasting/_source/plugins/pastefromword/dialogs/pastefromword.js	(revision 4206)
+++ /CKEditor/branches/features/pasting/_source/plugins/pastefromword/dialogs/pastefromword.js	(revision 4207)
@@ -103,11 +103,10 @@
 				iframe = container.getElementsByTag( 'iframe' ).getItem( 0 ),
 				editor = this.getParentEditor(),
-				html = this.definition.cleanWord( editor, iframe.$.contentWindow.document.body.innerHTML,
-						this.getValueOf( 'general', 'ignoreFontFace' ),
-						this.getValueOf( 'general', 'removeStyle' ) );
+				//TODO: Bring those dialog-based configs to the paste processor.
+				html = iframe.$.contentWindow.document.body.innerHTML;
 
 				// Insertion should happen after main document design mode turned on.
 				setTimeout( function(){
-					editor.insertHtml( html );
+					editor.fire( 'paste', { 'html' : html } );
 				}, 0 );
 		},
Index: /CKEditor/branches/features/pasting/_source/plugins/pastefromword/plugin.js
===================================================================
--- /CKEditor/branches/features/pasting/_source/plugins/pastefromword/plugin.js	(revision 4206)
+++ /CKEditor/branches/features/pasting/_source/plugins/pastefromword/plugin.js	(revision 4207)
@@ -19,5 +19,5 @@
 				command : 'pastefromword'
 			} );
-
+		
 		var config = editor.config;
 		editor.on( 'paste', function( evt )
@@ -28,15 +28,12 @@
 				 && /(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test( mswordHtml ) )
 			{
-				// Perform cleaning with default configuration.
-				editor.insertHtml(
-					CKEDITOR.plugins.pastefromword.cleanWord(
-						editor, mswordHtml,
-						config.pasteFromWordIgnoreFontFace,
-						config.pasteFromWordRemoveStyle));
+				var filter = editor.pasteProcessor.dataFilter;
+				// TODO: Migrate the 'CKEDITOR.plugins.pastefromword' to filter rules.
+				filter.addRules(
+				{
 
-				// Cancel other html paste handlers.
-				evt.cancel();
+				} );
 			}
-		}, null, null, 9 );
+		} );
 
 	}
Index: /CKEditor/branches/features/pasting/_source/plugins/pastetext/dialogs/pastetext.js
===================================================================
--- /CKEditor/branches/features/pasting/_source/plugins/pastetext/dialogs/pastetext.js	(revision 4206)
+++ /CKEditor/branches/features/pasting/_source/plugins/pastetext/dialogs/pastetext.js	(revision 4207)
@@ -24,7 +24,5 @@
 					// Get the textarea value.
 					var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue();
-
-					// Inserts the text.
-					this.getParentEditor().insertText( text );
+					this.getParentEditor().fire( 'paste', { 'text' : text } );
 				},
 
Index: /CKEditor/branches/features/pasting/_source/plugins/pastetext/plugin.js
===================================================================
--- /CKEditor/branches/features/pasting/_source/plugins/pastetext/plugin.js	(revision 4206)
+++ /CKEditor/branches/features/pasting/_source/plugins/pastetext/plugin.js	(revision 4207)
@@ -23,5 +23,5 @@
 			}
 
-			editor.insertText( window.clipboardData.getData( 'Text' ) );
+			editor.fire( 'paste', { 'text' : window.clipboardData.getData( 'Text' ) } );
 		}
 	};
