s.getEnclosedNode();
if ( selected )
{
try
{
ieRange = this.document.$.body.createControlRange();
ieRange.addElement( selected.$ );
ieRange.select();
return;
}
catch( er ) {}
}
// IE doesn't support selecting the entire table row/cell, move the selection into cells, e.g.
//
[cell | ... => [cell | ...
if ( this.startContainer.type == CKEDITOR.NODE_ELEMENT && this.startContainer.getName() in nonCells
|| this.endContainer.type == CKEDITOR.NODE_ELEMENT && this.endContainer.getName() in nonCells )
{
this.shrink( CKEDITOR.NODE_ELEMENT, true );
}
var bookmark = this.createBookmark();
// Create marker tags for the start and end boundaries.
var startNode = bookmark.startNode;
var endNode;
if ( !collapsed )
endNode = bookmark.endNode;
// Create the main range which will be used for the selection.
ieRange = this.document.$.body.createTextRange();
// Position the range at the start boundary.
ieRange.moveToElementText( startNode.$ );
ieRange.moveStart( 'character', 1 );
if ( endNode )
{
// Create a tool range for the end.
var ieRangeEnd = this.document.$.body.createTextRange();
// Position the tool range at the end.
ieRangeEnd.moveToElementText( endNode.$ );
// Move the end boundary of the main range to match the tool range.
ieRange.setEndPoint( 'EndToEnd', ieRangeEnd );
ieRange.moveEnd( 'character', -1 );
}
else
{
// The isStartMarkerAlone logic comes from V2. It guarantees that the lines
// will expand and that the cursor will be blinking on the right place.
// Actually, we are using this flag just to avoid using this hack in all
// situations, but just on those needed.
var next = startNode.getNext( notWhitespaces );
isStartMarkerAlone = ( !( next && next.getText && next.getText().match( fillerTextRegex ) ) // already a filler there?
&& ( forceExpand || !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) ) ) );
// Append a t