MCE Views: don't (re-)render views if the format of the content is "raw" to avoid adding additional undo levels on undo/redo.
Props gcorne. Fixes #27416. git-svn-id: https://develop.svn.wordpress.org/trunk@27544 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a339826668
commit
b6e2bd9f0e
@ -140,7 +140,11 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
editor.on( 'SetContent', function( event ) {
|
||||
var body, padNode;
|
||||
|
||||
wp.mce.views.render();
|
||||
// don't (re-)render views if the format of the content is raw
|
||||
// to avoid adding additional undo levels on undo/redo
|
||||
if ( event.format !== 'raw' ) {
|
||||
wp.mce.views.render();
|
||||
}
|
||||
|
||||
// Add padding <p> if the noneditable node is last
|
||||
if ( event.load || ! event.set ) {
|
||||
|
Loading…
Reference in New Issue
Block a user