diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js
index fc6284f..894f301 100644
|
a
|
b
|
window.wp = window.wp || {}; |
| 448 | 448 | * @param {Boolean} rendered Only set for (un)rendered nodes. Optional. |
| 449 | 449 | */ |
| 450 | 450 | setIframes: function( head, body, callback, rendered ) { |
| 451 | | var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, |
| 452 | | importStyles = this.type === 'video' || this.type === 'audio' || this.type === 'playlist'; |
| | 451 | var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; |
| 453 | 452 | |
| 454 | 453 | this.getNodes( function( editor, node, content ) { |
| 455 | 454 | var dom = editor.dom, |
| … |
… |
window.wp = window.wp || {}; |
| 460 | 459 | content.innerHTML = ''; |
| 461 | 460 | head = head || ''; |
| 462 | 461 | |
| 463 | | if ( importStyles ) { |
| 464 | | if ( ! wp.mce.views.sandboxStyles ) { |
| 465 | | tinymce.each( dom.$( 'link[rel="stylesheet"]', editor.getDoc().head ), function( link ) { |
| 466 | | if ( link.href && link.href.indexOf( 'skins/lightgray/content.min.css' ) === -1 && |
| 467 | | link.href.indexOf( 'skins/wordpress/wp-content.css' ) === -1 ) { |
| | 462 | if ( ! wp.mce.views.sandboxStyles ) { |
| | 463 | tinymce.each( dom.$( 'link[rel="stylesheet"]', editor.getDoc().head ), function( link ) { |
| | 464 | if ( link.href && link.href.indexOf( 'skins/lightgray/content.min.css' ) === -1 && |
| | 465 | link.href.indexOf( 'skins/wordpress/wp-content.css' ) === -1 ) { |
| 468 | 466 | |
| 469 | | styles += dom.getOuterHTML( link ) + '\n'; |
| 470 | | } |
| 471 | | }); |
| | 467 | styles += dom.getOuterHTML( link ) + '\n'; |
| | 468 | } |
| | 469 | }); |
| 472 | 470 | |
| 473 | | wp.mce.views.sandboxStyles = styles; |
| 474 | | } else { |
| 475 | | styles = wp.mce.views.sandboxStyles; |
| 476 | | } |
| | 471 | wp.mce.views.sandboxStyles = styles; |
| | 472 | } else { |
| | 473 | styles = wp.mce.views.sandboxStyles; |
| 477 | 474 | } |
| 478 | 475 | |
| 479 | 476 | // Seems Firefox needs a bit of time to insert/set the view nodes, |
| … |
… |
window.wp = window.wp || {}; |
| 561 | 558 | } |
| 562 | 559 | } |
| 563 | 560 | |
| 564 | | if ( importStyles ) { |
| 565 | | editor.on( 'wp-body-class-change', function() { |
| 566 | | iframeDoc.body.className = editor.getBody().className; |
| 567 | | } ); |
| 568 | | } |
| | 561 | editor.on( 'wp-body-class-change', function() { |
| | 562 | iframeDoc.body.className = editor.getBody().className; |
| | 563 | } ); |
| | 564 | |
| 569 | 565 | }, 50 ); |
| 570 | 566 | |
| 571 | 567 | callback && callback.apply( this, arguments ); |