From ae1538daed6bb0c6011e35097559fe152ba76a98 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 30 Mar 2015 18:21:56 +0000 Subject: [PATCH] TinyMCE wpView: add back the removal of selected views on inserting new content. Was removed when reverting the first fix for embedding of pasted URLs. Props mattheu. Fixes #31796. git-svn-id: https://develop.svn.wordpress.org/trunk@31931 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/tinymce/plugins/wpview/plugin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/js/tinymce/plugins/wpview/plugin.js b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js index 216a922fbe..9a8b650e1c 100644 --- a/src/wp-includes/js/tinymce/plugins/wpview/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js @@ -173,6 +173,10 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { return; } + if ( selected ) { + removeView( selected ); + } + if ( ! event.load ) { node = editor.selection.getNode();