Ticket #39337: 39337.2.patch
File 39337.2.patch, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/js/mce-view.js
116 116 } 117 117 118 118 instance = self.createInstance( type, result.content, result.options ); 119 text = instance. loader ? '.' : instance.text;119 text = instance.text; 120 120 121 121 // Add the processed piece for the match. 122 122 pieces.push( { … … 428 428 */ 429 429 replaceMarkers: function() { 430 430 this.getMarkers( function( editor, node ) { 431 var $viewNode;431 var viewNode; 432 432 433 433 if ( ! this.loader && $( node ).text() !== this.text ) { 434 434 editor.dom.setAttrib( node, 'data-wpview-marker', null ); … … 435 435 return; 436 436 } 437 437 438 $viewNode = editor.$( 439 '<div class="wpview wpview-wrap" data-wpview-text="' + this.encodedText + '" data-wpview-type="' + this.type + '" contenteditable="false"></div>' 440 ); 438 viewNode = editor.dom.create( 'div', { 439 'class': 'wpview wpview-wrap', 440 'data-wpview-text': this.encodedText, 441 'data-wpview-type': this.type, 442 'contenteditable': 'false' 443 } ); 441 444 442 editor.$( node ).replaceWith( $viewNode ); 445 editor.$( node ).replaceWith( viewNode ); 446 447 if ( ! viewNode.nextSibling ) { 448 editor.selection.select( viewNode ); 449 450 setTimeout( function() { 451 editor.selection.collapse(); 452 } ); 453 } 443 454 } ); 444 455 }, 445 456