public/ckeditor/_source/core/htmlparser/fragment.js
function( node, index )
		{
			isNaN( index ) && ( index = this.children.length );

			var previous = index > 0 ? this.children[ index - 1 ] : null;
			if ( previous )
			{
				// If the block to be appended is following text, trim spaces at
				// the right of it.
				if ( node._.isBlockLike && previous.type == CKEDITOR.NODE_TEXT )
				{
					previous.value = CKEDITOR.tools.rtrim( previous.value );

					// If we have completely cleared the previous node.
					if ( previous.value.length === 0 )
					{
						// Remove it from the list and add the node again.
						this.children.pop();
						this.add( node );
						return;
					}
				}

				previous.next = node;
			}

			node.previous = previous;
			node.parent = this;

			this.children.splice( index, 0, node );

			this._.hasInlineStarted = node.type == CKEDITOR.NODE_TEXT || ( node.type == CKEDITOR.NODE_ELEMENT && !node._.isBlockLike );
		}
function( node, index )
		{
			isNaN( index ) && ( index = this.children.length );

			var previous = index > 0 ? this.children[ index - 1 ] : null;
			if ( previous )
			{
				// If the block to be appended is following text, trim spaces at
				// the right of it.
				if ( node._.isBlockLike && previous.type == CKEDITOR.NODE_TEXT )
				{
					previous.value = CKEDITOR.tools.rtrim( previous.value );

					// If we have completely cleared the previous node.
					if ( previous.value.length === 0 )
					{
						// Remove it from the list and add the node again.
						this.children.pop();
						this.add( node );
						return;
					}
				}

				previous.next = node;
			}

			node.previous = previous;
			node.parent = this;

			this.children.splice( index, 0, node );

			this._.hasInlineStarted = node.type == CKEDITOR.NODE_TEXT || ( node.type == CKEDITOR.NODE_ELEMENT && !node._.isBlockLike );
		}
function ( node , index ) { isNaN ( index ) && ( index = this . children . length ) ; var previous = index > 0 ? this . children [ index - 1 ] : null ; if ( previous ) { // If the block to be appended is following text, trim spaces at
 // the right of it.
 if ( node . _ . isBlockLike && previous . type == CKEDITOR . NODE_TEXT ) { previous . value = CKEDITOR . tools . rtrim ( previous . value ) ; // If we have completely cleared the previous node.
 if ( previous . value . length === 0 ) { // Remove it from the list and add the node again.
 this . children . pop ( ) ; this . add ( node ) ; return ; } } previous . next = node ; } node . previous = previous ; node . parent = this ; this . children . splice ( index , 0 , node ) ; this . _ . hasInlineStarted = node . type == CKEDITOR . NODE_TEXT || ( node . type == CKEDITOR . NODE_ELEMENT && ! node . _ . isBlockLike ) ; }
Adds a node to this fragment.
@param {Object} node The node to be added. It can be any of of the
following types: {@link CKEDITOR.htmlParser.element},
{@link CKEDITOR.htmlParser.text} and
{@link CKEDITOR.htmlParser.comment}.
@param {Number} [index] From where the insertion happens.
@example
Adds a node to this fragment .