Ticket #31669: 31669.15.patch
File 31669.15.patch, 2.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/mce-view.js
322 322 this.replaceMarkers(); 323 323 324 324 if ( content ) { 325 this.setContent( content, function( editor, node ) {325 this.setContent( content, function( editor, node, contentNode ) { 326 326 $( node ).data( 'rendered', true ); 327 this.bindNode.call( this, editor, node );327 this.bindNode.call( this, editor, node, contentNode ); 328 328 }, force ? null : false ); 329 329 } else { 330 330 this.setLoader(); … … 346 346 * Runs before their content is removed from the DOM. 347 347 */ 348 348 unbind: function() { 349 this.getNodes( function( editor, node ) {350 this.unbindNode.call( this, editor, node );349 this.getNodes( function( editor, node, contentNode ) { 350 this.unbindNode.call( this, editor, node, contentNode ); 351 351 $( node ).trigger( 'wp-mce-view-unbind' ); 352 352 }, true ); 353 353 }, … … 485 485 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, 486 486 self = this; 487 487 488 this.getNodes( function( editor, node, content ) {488 this.getNodes( function( editor, node, contentNode ) { 489 489 var dom = editor.dom, 490 490 styles = '', 491 491 bodyClasses = editor.getBody().className || '', … … 504 504 setTimeout( function() { 505 505 var iframe, iframeDoc, observer, i; 506 506 507 content .innerHTML = '';507 contentNode.innerHTML = ''; 508 508 509 iframe = dom.add( content , 'iframe', {509 iframe = dom.add( contentNode, 'iframe', { 510 510 /* jshint scripturl: true */ 511 511 src: tinymce.Env.ie ? 'javascript:""' : '', 512 512 frameBorder: '0', … … 519 519 } 520 520 } ); 521 521 522 dom.add( content , 'div', { 'class': 'wpview-overlay' } );522 dom.add( contentNode, 'div', { 'class': 'wpview-overlay' } ); 523 523 524 524 iframeDoc = iframe.contentWindow.document; 525 525 … … 603 603 editor.off( 'wp-body-class-change', classChange ); 604 604 } ); 605 605 606 callback && callback.call( self, editor, node );606 callback && callback.call( self, editor, node, contentNode ); 607 607 }, 50 ); 608 608 }, rendered ); 609 609 },