diff --git src/wp-includes/js/mce-view.js src/wp-includes/js/mce-view.js
index 1fd477c..2516187 100644
|
|
|
window.wp = window.wp || {}; |
| 46 | 46 | }); |
| 47 | 47 | } |
| 48 | 48 | }, this ); |
| | 49 | }, |
| | 50 | reinit: function() { |
| | 51 | // Search all tinymce editor instances and update the placeholders |
| | 52 | _.each( tinymce.editors, function( editor ) { |
| | 53 | var doc, self = this; |
| | 54 | if ( editor.plugins.wpview ) { |
| | 55 | doc = editor.getDoc(); |
| | 56 | $( doc ).find( '[data-wpview-text="' + this.encodedText + '"]' ).each(function (i, elem) { |
| | 57 | $( self ).trigger( 'ready', elem ); |
| | 58 | }); |
| | 59 | } |
| | 60 | }, this ); |
| | 61 | |
| 49 | 62 | } |
| 50 | 63 | } ); |
| 51 | 64 | |
| … |
… |
window.wp = window.wp || {}; |
| 209 | 222 | wp.mce.views.render(); |
| 210 | 223 | }, |
| 211 | 224 | |
| | 225 | /** |
| | 226 | * Trigger event that individual views can use to initialize any event bindings |
| | 227 | * |
| | 228 | * Note: Great care needs to be taken to avoid memory leaks when binding events directly to view nodes. |
| | 229 | */ |
| | 230 | |
| | 231 | reinitializeViews: function() { |
| | 232 | _.each( instances, function( instance ) { |
| | 233 | instance.reinit(); |
| | 234 | } ); |
| | 235 | }, |
| | 236 | |
| 212 | 237 | getInstance: function( encodedText ) { |
| 213 | 238 | return instances[ encodedText ]; |
| 214 | 239 | }, |
| … |
… |
window.wp = window.wp || {}; |
| 460 | 485 | setTimeout( function() { |
| 461 | 486 | self.player = new MediaElementPlayer( media, this.mejsSettings ); |
| 462 | 487 | }, 75 ); |
| | 488 | |
| | 489 | |
| 463 | 490 | }, |
| 464 | 491 | |
| 465 | 492 | /** |
diff --git src/wp-includes/js/tinymce/plugins/wpview/plugin.js src/wp-includes/js/tinymce/plugins/wpview/plugin.js
index 75f7047..8c69853 100644
|
|
|
tinymce.PluginManager.add( 'wpview', function( editor ) { |
| 166 | 166 | // to avoid adding additional undo levels on undo/redo |
| 167 | 167 | if ( event.format !== 'raw' ) { |
| 168 | 168 | wp.mce.views.render(); |
| | 169 | } else { |
| | 170 | wp.mce.views.reinitializeViews(); |
| 169 | 171 | } |
| 170 | 172 | |
| 171 | 173 | // Add padding <p> if the noneditable node is last |