Index: wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js
===================================================================
--- wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js	(revision 22530)
+++ wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js	(working copy)
@@ -11,6 +11,8 @@
 		init : function( editor, url ) {
 			var wpView = this;
 
+			this.editor = editor;
+
 			// Check if the `wp.mce` API exists.
 			if ( typeof wp === 'undefined' || ! wp.mce )
 				return;
@@ -18,6 +20,19 @@
 			editor.onPreInit.add( function( editor ) {
 				// Add elements so we can set `contenteditable` to false.
 				editor.schema.addValidElements('div[*],span[*]');
+
+				editor.undoManager.onBeforeAdd.addToTop(function(undoManager, o){
+					o.content = wp.mce.view.toText( o.content );
+
+					console.log( 'undo.onBeforeAdd = '+o.content )
+				});
+
+				editor.undoManager.onRedo.addToTop(function(undoManager, o){
+					// Add back any views that were converted to text before deleting them
+					o.content = wp.mce.view.toViews( o.content );
+
+					console.log( 'onRedo = '+o.content )
+				});
 			});
 
 			// When the editor's content changes, scan the new content for
@@ -129,9 +144,32 @@
 
 				// If delete or backspace is pressed, delete the view.
 				if ( keyCode === VK.DELETE || keyCode === VK.BACKSPACE ) {
-					if ( (instance = wp.mce.view.instance( selected )) ) {
+					if ( instance = wp.mce.view.instance( selected ) ) {
+						var dom = editor.dom, parent = selected.parentNode, html, temp, viewText;
+
+						// Get the view's HTML as string and convert it to text mode
+						html = wp.mce.view.toText( dom.getOuterHTML(selected) );
+
+						// Create a temporary span to hold the view's text and replace the view with the temp span
+						temp = dom.create('span', {}, html);
+						dom.replace( temp, selected );
+
+						// Run any "remove" callbacks
+						// (At this point the view has alredy been removed from the dom. Could that cause problems?)
 						instance.remove();
 						wpView.deselect();
+
+						// Get the text for the view again in case it has changed
+						viewText = temp.innerHTML;
+						// Remove the temp <span> leaving its content only
+						dom.remove(temp, true);
+
+						// Cancel the undo level up to this point
+						editor.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
+
+						// Finally delete the view's text. This will be saved in the undo level.
+						parent.innerHTML = parent.innerHTML.replace(viewText, '');
+						editor.nodeChanged();
 					}
 				}
 
@@ -140,12 +178,12 @@
 				if ( event.metaKey || event.ctrlKey || ( keyCode >= 112 && keyCode <= 123 ) )
 					return;
 
-				event.preventDefault();
+				editor.dom.event.prevent(event);
 			});
 		},
 
 		getParentView : function( node ) {
-			while ( node ) {
+			while ( node && node.nodeName != 'BODY' ) {
 				if ( this.isView( node ) )
 					return node;
 
@@ -185,4 +223,4 @@
 
 	// Register plugin
 	tinymce.PluginManager.add( 'wpview', tinymce.plugins.wpView );
-})();
\ No newline at end of file
+})();
