diff --git a/wp-includes/js/tinymce/plugins/wordpress/plugin.js b/wp-includes/js/tinymce/plugins/wordpress/plugin.js
index b79146a..3a3347a 100644
a
|
b
|
tinymce.PluginManager.add( 'wordpress', function( editor ) { |
150 | 150 | return; |
151 | 151 | } |
152 | 152 | |
153 | | // Get the top level parent node |
154 | | parent = dom.getParent( node, function( found ) { |
155 | | if ( found.parentNode && found.parentNode.nodeName === 'BODY' ) { |
156 | | return true; |
157 | | } |
158 | | |
159 | | return false; |
160 | | }, editor.getBody() ); |
161 | | |
162 | | if ( parent ) { |
163 | | if ( parent.nodeName === 'P' ) { |
164 | | parent.appendChild( dom.create( 'p', null, html ).firstChild ); |
165 | | } else { |
166 | | dom.insertAfter( dom.create( 'p', null, html ), parent ); |
167 | | } |
168 | | |
169 | | editor.nodeChanged(); |
170 | | } |
| 153 | var el = tinyMCE.activeEditor.dom.create('p', {}, html); |
| 154 | editor.selection.setNode(el); |
171 | 155 | }); |
172 | 156 | |
173 | 157 | editor.addCommand( 'WP_Code', function() { |