Code Index | File Index

Namespaces

Classes


Class CKEDITOR.dom.text


Extends CKEDITOR.dom.node.
Defined in: core/dom/text.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
CKEDITOR.dom.text(text, ownerDocument)
Represents a DOM text node.
Field Summary
Field Attributes Field Name and Description
 
$
The native DOM text node represented by this class instance.
 
The node type.
Fields borrowed from class CKEDITOR.dom.domObject:
removeCustomData
Method Summary
Method Attributes Method Name and Description
 
 
 
setText(text)
 
split(The)
Breaks this text node into two nodes at the specified offset, keeping both in the tree as siblings.
 
substring(indexA, indexB)
Extracts characters from indexA up to but not including indexB.
Methods borrowed from class CKEDITOR.dom.node:
appendTo, clone, getAddress, getAscendant, getCommonAncestor, getDocument, getIndex, getNext, getNextSourceNode, getParent, getParents, getPosition, getPrevious, getPreviousSourceNode, hasAscendant, hasNext, hasPrevious, insertAfter, insertBefore, insertBeforeMe, isReadOnly, ltrim, move, remove, replace, rtrim, trim
Methods borrowed from class CKEDITOR.dom.domObject:
clearCustomData, equals, getCustomData, getPrivate, getUniqueId, removeAllListeners, setCustomData
Methods borrowed from class CKEDITOR.event:
fire, fireOnce, hasListeners, on, removeListener
Class Detail
CKEDITOR.dom.text(text, ownerDocument)
Since: 3.0
Represents a DOM text node.
var nativeNode = document.createTextNode( 'Example' );
var text = CKEDITOR.dom.text( nativeNode );
var text = CKEDITOR.dom.text( 'Example' );
Parameters:
{Object|String} text
A native DOM text node or a string containing the text to use to create a new text node.
{CKEDITOR.dom.document} ownerDocument Optional
The document that will contain the node in case of new node creation. Defaults to the current document.
Field Detail
{Object} $
Since: 3.0
The native DOM text node represented by this class instance.
var element = new CKEDITOR.dom.text( 'Example' );
alert( element.$.nodeType );  // "3"

{Number} type
Since: 3.0
The node type. This is a constant value set to CKEDITOR.NODE_TEXT.
Method Detail
{Undefined} getLength()
Since: 3.0
NO EXAMPLE AVAILABLE

{Undefined} getText()
Since: 3.0
NO EXAMPLE AVAILABLE

{Undefined} setText(text)
Since: 3.0
NO EXAMPLE AVAILABLE
Parameters:
{Undefined} text

{CKEDITOR.dom.text} split(The)
Since: 3.0
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.
NO EXAMPLE AVAILABLE
Parameters:
{Number} The
position at which to split, starting from zero.
Returns:
{CKEDITOR.dom.text} The new text node.

{Undefined} substring(indexA, indexB)
Since: 3.0
Extracts characters from indexA up to but not including indexB.
NO EXAMPLE AVAILABLE
Parameters:
{Number} indexA
An integer between 0 and one less than the length of the text.
{Number} indexB Optional
An integer between 0 and the length of the string. If omitted, extracts characters to the end of the text.

Copyright © 2003-2010, CKSource - Frederico Knabben. All rights reserved.