TinyMCE wpView: properly deselect views when hiding the editor. Do not remove selected
on PreProcess.
Fixes #32045. git-svn-id: https://develop.svn.wordpress.org/trunk@32257 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
19c0b3f469
commit
312edcbc9d
@ -361,9 +361,6 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
|
||||
// Remove marker attributes
|
||||
$( 'p[data-wpview-marker]', rootNode ).attr( 'data-wpview-marker', null );
|
||||
|
||||
// Reset the selected node if any
|
||||
selected = null;
|
||||
}
|
||||
|
||||
editor.on( 'PreProcess', function( event ) {
|
||||
@ -374,6 +371,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
editor.on( 'hide', function() {
|
||||
// Replace the view nodes with their text directly in the editor body.
|
||||
wp.mce.views.unbind();
|
||||
deselect();
|
||||
resetViews( editor.getBody() );
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user