public/ckeditor/4.4dev/core/dom/text.js
function( offset ) {

		// Saved the children count and text length beforehand.
		var parent = this.$.parentNode,
			count = parent.childNodes.length,
			length = this.getLength();

		var doc = this.getDocument();
		var retval = new CKEDITOR.dom.text( this.$.splitText( offset ), doc );

		if ( parent.childNodes.length == count )
		{
			// If the offset is after the last char, IE creates the text node
			// on split, but don't include it into the DOM. So, we have to do
			// that manually here.
			if ( offset >= length )
			{
				retval = doc.createText( '' );
				retval.insertAfter( this );
			}
			else
			{
				// IE BUG: IE8+ does not update the childNodes array in DOM after splitText(),
				// we need to make some DOM changes to make it update. (#3436)
				var workaround = doc.createText( '' );
				workaround.insertAfter( retval );
				workaround.remove();
			}
		}

		return retval;
	}
function( offset ) {

		// Saved the children count and text length beforehand.
		var parent = this.$.parentNode,
			count = parent.childNodes.length,
			length = this.getLength();

		var doc = this.getDocument();
		var retval = new CKEDITOR.dom.text( this.$.splitText( offset ), doc );

		if ( parent.childNodes.length == count )
		{
			// If the offset is after the last char, IE creates the text node
			// on split, but don't include it into the DOM. So, we have to do
			// that manually here.
			if ( offset >= length )
			{
				retval = doc.createText( '' );
				retval.insertAfter( this );
			}
			else
			{
				// IE BUG: IE8+ does not update the childNodes array in DOM after splitText(),
				// we need to make some DOM changes to make it update. (#3436)
				var workaround = doc.createText( '' );
				workaround.insertAfter( retval );
				workaround.remove();
			}
		}

		return retval;
	}
function ( offset ) { // Saved the children count and text length beforehand. var parent = this . $ . parentNode , count = parent . childNodes . length , length = this . getLength ( ) ; var doc = this . getDocument ( ) ; var retval = new CKEDITOR . dom . text ( this . $ . splitText ( offset ) , doc ) ; if ( parent . childNodes . length == count ) { // If the offset is after the last char, IE creates the text node // on split, but don't include it into the DOM. So, we have to do // that manually here. if ( offset >= length ) { retval = doc . createText ( '' ) ; retval . insertAfter ( this ) ; } else { // IE BUG: IE8+ does not update the childNodes array in DOM after splitText(), // we need to make some DOM changes to make it update. (#3436) var workaround = doc . createText ( '' ) ; workaround . insertAfter ( retval ) ; workaround . remove ( ) ; } } return retval ; }
Breaks this text node into two nodes at the specified offset,
keeping both in the tree as siblings. This node then only contains
all the content up to the offset point. A new text node, which is
inserted as the next sibling of this node, contains all the content
at and after the offset point. When the offset is equal to the
length of this node, the new node has no data.

@param {Number} The position at which to split, starting from zero.
@returns {CKEDITOR.dom.text} The new text node.
Breaks this text node into two nodes at the specified offset keeping both in the tree as siblings . This node then only contains all the content up to the offset point . A new text node which is inserted as the next sibling of this node contains all the content at and after the offset point . When the offset is equal to the length of this node the new node has no data .