Index: src/wp-includes/js/mce-view.js
===================================================================
--- src/wp-includes/js/mce-view.js	(revision 31485)
+++ src/wp-includes/js/mce-view.js	(working copy)
@@ -43,36 +43,56 @@
 			return '';
 		},
 		loadingPlaceholder: function() {
-			return '' +
+			return (
 				'<div class="loading-placeholder">' +
 					'<div class="dashicons dashicons-admin-media"></div>' +
 					'<div class="wpview-loading"><ins></ins></div>' +
-				'</div>';
+				'</div>'
+			);
 		},
 		render: function( force ) {
-			if ( force || ! this.rendered() ) {
+			var self = this;
+
+			if ( ( ! this.loadingPlaceholder || ! this.loadingPlaceholder() ) && ! this.getHtml() ) {
+				return;
+			}
+
+			if ( force ) {
 				this.unbind();
+				this.setContent( this.getHtml() || this.loadingPlaceholder() );
+			}
 
-				this.setContent(
-					'<p class="wpview-selection-before">\u00a0</p>' +
-					'<div class="wpview-body" contenteditable="false">' +
-						'<div class="toolbar mce-arrow-down">' +
-							( _.isFunction( views[ this.type ].edit ) ? '<div class="dashicons dashicons-edit edit"></div>' : '' ) +
-							'<div class="dashicons dashicons-no remove"></div>' +
-						'</div>' +
-						'<div class="wpview-content wpview-type-' + this.type + '">' +
-							( this.getHtml() || this.loadingPlaceholder() ) +
-						'</div>' +
-						( this.overlay ? '<div class="wpview-overlay"></div>' : '' ) +
-					'</div>' +
-					'<p class="wpview-selection-after">\u00a0</p>',
-					'wrap'
-				);
+			this.getEditors( function( editor ) {
+				$( editor.getBody() )
+				.find( '[data-wpview-marked="' + self.encodedText + '"]' )
+				.each( function ( i, node ) {
+					if ( $( node ).text() !== decodeURIComponent( self.encodedText ) ) {
+						editor.dom.setAttrib( 'data-wpview-marked', null );
+					}
 
-				$( this ).trigger( 'ready' );
+					editor.dom.replace(
+						editor.dom.createFragment(
+							'<div class="wpview-wrap" data-wpview-text="' + self.encodedText + '" data-wpview-type="' + self.type + '">' +
+								'<p class="wpview-selection-before">\u00a0</p>' +
+								'<div class="wpview-body" contenteditable="false">' +
+									'<div class="toolbar mce-arrow-down">' +
+										( _.isFunction( views[ self.type ].edit ) ? '<div class="dashicons dashicons-edit edit"></div>' : '' ) +
+										'<div class="dashicons dashicons-no remove"></div>' +
+									'</div>' +
+									'<div class="wpview-content wpview-type-' + self.type + '">' +
+										( self.getHtml() || self.loadingPlaceholder() ) +
+									'</div>' +
+									( self.overlay ? '<div class="wpview-overlay"></div>' : '' ) +
+								'</div>' +
+								'<p class="wpview-selection-after">\u00a0</p>' +
+							'</div>'
+						),
+						node
+					);
+				} );
+			} );
 
-				this.rendered( true );
-			}
+			$( this ).trigger( 'ready' );
 		},
 		unbind: function() {},
 		getEditors: function( callback ) {
@@ -110,19 +130,8 @@
 		},
 		setContent: function( html, option ) {
 			this.getNodes( function ( editor, node, content ) {
-				var el = ( option === 'wrap' || option === 'replace' ) ? node : content,
-					insert = html;
-
-				if ( _.isString( insert ) ) {
-					insert = editor.dom.createFragment( insert );
-				}
-
-				if ( option === 'replace' ) {
-					editor.dom.replace( insert, el );
-				} else {
-					el.innerHTML = '';
-					el.appendChild( insert );
-				}
+				content.innerHTML = '';
+				content.appendChild( _.isString( html ) ? editor.dom.createFragment( html ) : html );
 			} );
 		},
 		/* jshint scripturl: true */
@@ -254,19 +263,6 @@
 					'<p>' + message + '</p>' +
 				'</div>'
 			);
-		},
-		rendered: function( value ) {
-			var notRendered;
-
-			this.getNodes( function( editor, node ) {
-				if ( value != null ) {
-					$( node ).data( 'rendered', value === true );
-				} else {
-					notRendered = notRendered || ! $( node ).data( 'rendered' );
-				}
-			} );
-
-			return ! notRendered;
 		}
 	} );
 
@@ -432,17 +428,7 @@
 				instances[ encodedText ] = instance;
 			}
 
-			return wp.html.string({
-				tag: 'div',
-
-				attrs: {
-					'class': 'wpview-wrap',
-					'data-wpview-text': encodedText,
-					'data-wpview-type': viewType
-				},
-
-				content: '\u00a0'
-			});
+			return '<p data-wpview-marked="' + encodedText + '">' + text + '</p>';
 		},
 
 		/**
@@ -681,13 +667,8 @@
 					}
 				} )
 				.done( function( response ) {
-					if ( response ) {
-						self.parsed = response;
-						self.setIframes( response.head, response.body );
-						self.deferredListen();
-					} else {
-						self.fail( true );
-					}
+					self.parsed = response;
+					self.render();
 				} )
 				.fail( function( response ) {
 					self.fail( response || true );
@@ -742,6 +723,10 @@
 
 			unbind: function() {
 				this.stopPlayers( 'remove' );
+			},
+
+			getHtml: function() {
+				return this.parsed ? '\u00a0' : '';
 			}
 		},
 
@@ -891,7 +876,10 @@
 					url: match[2]
 				}
 			};
-		}
+		},
+		View: _.extend( {}, wp.mce.embedMixin.View, {
+			loadingPlaceholder: false
+		} )
 	} ) );
 
 }(jQuery));
