Code Index | File Index

Namespaces

Classes


Class CKEDITOR.dom.node


Defined in: core/dom/node.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Base class for classes representing DOM nodes.
Field Summary
Field Attributes Field Name and Description
 
$
The native DOM node represented by this class instance.
Method Summary
Method Attributes Method Name and Description
 
appendTo(element)
Makes this node child of another element.
 
Inserts this element after a node.
 
Inserts this element before a node.
Class Detail
CKEDITOR.dom.node(domNode)
Since: 3.0
Base class for classes representing DOM nodes. This constructor may return and instance of classes that inherits this class, like CKEDITOR.dom.element or CKEDITOR.dom.text.
Parameters:
{Object} domNode
A native DOM node.
See:
CKEDITOR.dom.element
CKEDITOR.dom.text
Field Detail
{Object} $
Since: 3.0
The native DOM node represented by this class instance.
var element = new CKEDITOR.dom.node( document.body );
alert( element.$.nodeType );  // "1"
Method Detail
{CKEDITOR.dom.element} appendTo(element)
Since: 3.0
Makes this node child of another element.
var p = new CKEDITOR.dom.element( 'p' );
var strong = new CKEDITOR.dom.element( 'strong' );
strong.appendTo( p );

// result: "<p><strong></strong></p>"
Parameters:
{CKEDITOR.dom.element} element
The target element to which append this node.
Returns:
{CKEDITOR.dom.element} The target element.

{CKEDITOR.dom.node} insertAfter(node)
Since: 3.0
Inserts this element after a node.
var em = new CKEDITOR.dom.element( 'em' );
var strong = new CKEDITOR.dom.element( 'strong' );
strong.insertAfter( em );

// result: "<em></em><strong></strong>"
Parameters:
{CKEDITOR.dom.node} node
The that will preceed this element.
Returns:
{CKEDITOR.dom.node} The node preceeding this one after insertion.

{CKEDITOR.dom.node} insertBefore(node)
Since: 3.0
Inserts this element before a node.
var em = new CKEDITOR.dom.element( 'em' );
var strong = new CKEDITOR.dom.element( 'strong' );
strong.insertBefore( em );

// result: "<strong></strong><em></em>"
Parameters:
{CKEDITOR.dom.node} node
The that will be after this element.
Returns:
{CKEDITOR.dom.node} The node after this one after insertion.

Documentation generated by JsDoc Toolkit