public/ckeditor/4.4dev/core/selection.js
function() {
					var range = self.getRanges()[ 0 ].clone(),
						enclosed, selected;

					// Check first any enclosed element, e.g. <ul>[<li><a href="#">item</a></li>]</ul>
					for ( var i = 2; i && !( ( enclosed = range.getEnclosedNode() ) && ( enclosed.type == CKEDITOR.NODE_ELEMENT ) && styleObjectElements[ enclosed.getName() ] && ( selected = enclosed ) ); i-- ) {
						// Then check any deep wrapped element, e.g. [<b><i><img /></i></b>]
						range.shrink( CKEDITOR.SHRINK_ELEMENT );
					}

					return selected && selected.$;
				}
function() {
					var range = self.getRanges()[ 0 ].clone(),
						enclosed, selected;

					// Check first any enclosed element, e.g. <ul>[<li><a href="#">item</a></li>]</ul>
					for ( var i = 2; i && !( ( enclosed = range.getEnclosedNode() ) && ( enclosed.type == CKEDITOR.NODE_ELEMENT ) && styleObjectElements[ enclosed.getName() ] && ( selected = enclosed ) ); i-- ) {
						// Then check any deep wrapped element, e.g. [<b><i><img /></i></b>]
						range.shrink( CKEDITOR.SHRINK_ELEMENT );
					}

					return selected && selected.$;
				}
function ( ) { var range = self . getRanges ( ) [ 0 ] . clone ( ) , enclosed , selected ; // Check first any enclosed element, e.g. <ul>[<li><a href="#">item</a></li>]</ul> for ( var i = 2 ; i && ! ( ( enclosed = range . getEnclosedNode ( ) ) && ( enclosed . type == CKEDITOR . NODE_ELEMENT ) && styleObjectElements [ enclosed . getName ( ) ] && ( selected = enclosed ) ) ; i -- ) { // Then check any deep wrapped element, e.g. [<b><i><img /></i></b>] range . shrink ( CKEDITOR . SHRINK_ELEMENT ) ; } return selected && selected . $ ; }
Figure it out by checking if there's a single enclosed node of the range.
Figure it out by checking if there s a single enclosed node of the range .