Changeset 40996
- Timestamp:
- 07/03/2017 09:40:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
r40990 r40996 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'; … … 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; … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.