TinyMCE wpView:

- Remove selected views when inserting content but not when loading all content.
- Remove the ref. to the selected view node on resetting the views.
Fixes #31998.
Built from https://develop.svn.wordpress.org/trunk@32140


git-svn-id: http://core.svn.wordpress.org/trunk@32120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-04-18 20:48:27 +00:00
parent 25d8acfdfd
commit 9891900a82
4 changed files with 9 additions and 6 deletions

View File

@ -182,11 +182,11 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
return;
}
if ( selected ) {
removeView( selected );
}
if ( ! event.load ) {
if ( selected ) {
removeView( selected );
}
node = editor.selection.getNode();
if ( node && node !== editor.getBody() && /^\s*https?:\/\/\S+\s*$/i.test( event.content ) ) {
@ -361,6 +361,9 @@ 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 ) {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-RC1-32139';
$wp_version = '4.2-RC1-32140';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.