Ticket #41230: 41230.patch
| File 41230.patch, 1.2 KB (added by , 9 years ago) |
|---|
-
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
187 187 var parent, html, title, 188 188 classname = 'wp-more-tag', 189 189 dom = editor.dom, 190 node = editor.selection.getNode(); 190 node = editor.selection.getNode(), 191 rootNode = editor.getBody(); 191 192 192 193 tag = tag || 'more'; 193 194 classname += ' mce-wp-' + tag; … … 197 198 'data-wp-more="' + tag + '" data-mce-resize="false" data-mce-placeholder="1" />'; 198 199 199 200 // Most common case 200 if ( node .nodeName === 'BODY' || ( node.nodeName === 'P' && node.parentNode.nodeName === 'BODY') ) {201 if ( node === rootNode || ( node.nodeName === 'P' && node.parentNode === rootNode ) ) { 201 202 editor.insertContent( html ); 202 203 return; 203 204 } 204 205 205 206 // Get the top level parent node 206 207 parent = dom.getParent( node, function( found ) { 207 if ( found.parentNode && found.parentNode .nodeName === 'BODY') {208 if ( found.parentNode && found.parentNode === rootNode ) { 208 209 return true; 209 210 } 210 211