Class CKFinder.dom.node
Extends
CKFinder.dom.domObject.
Constructor Attributes | Constructor Name and Description |
---|---|
CKFinder.dom.node(domNode)
Base class for classes representing DOM nodes.
|
- Fields borrowed from class CKFinder.dom.domObject:
- $
Method Attributes | Method Name and Description |
---|---|
appendTo(element, toStart)
Makes this node child of another element.
|
|
clone(includeChildren, cloneId)
|
|
Gets the document containing this element.
|
|
Gets the parent element for this node.
|
|
insertAfter(node)
Inserts this element after a node.
|
|
insertBefore(node)
Inserts this element before a node.
|
|
ltrim()
|
|
move(target, toStart)
|
|
remove(preserveChildren)
Removes this node from the document DOM.
|
|
replace(nodeToReplace)
|
|
rtrim()
|
|
trim()
|
- Methods borrowed from class CKFinder.dom.domObject:
- equals, getCustomData, setCustomData
Class Detail
CKFinder.dom.node(domNode)
Since:
2.0
Base class for classes representing DOM nodes. This constructor may return
and instance of classes that inherits this class, like
CKFinder.dom.element or CKFinder.dom.text.
- Parameters:
- {Object} domNode
- A native DOM node.
- See:
- CKFinder.dom.element
Method Detail
{CKFinder.dom.element}
appendTo(element, toStart)
Since:
2.0
Makes this node child of another element.
var p = new CKFinder.dom.element( 'p' ); var strong = new CKFinder.dom.element( 'strong' ); strong.appendTo( p ); // result: "<p><strong></strong></p>"
- Parameters:
- {CKFinder.dom.element} element
- The target element to which append this node.
- {Undefined} toStart
- Returns:
- {CKFinder.dom.element} The target element.
{Undefined}
clone(includeChildren, cloneId)
Since:
2.0
NO EXAMPLE AVAILABLE
- Parameters:
- {Undefined} includeChildren
- {Undefined} cloneId
{CKFinder.dom.document}
getDocument()
Since:
2.0
Gets the document containing this element.
var element = CKFinder.document.getById( 'example' ); alert( element.getDocument().equals( CKFinder.document ) ); // "true"
- Returns:
- {CKFinder.dom.document} The document.
{CKFinder.dom.element}
getParent()
Since:
2.0
Gets the parent element for this node.
var node = application.document.getBody().getFirst(); var parent = node.getParent(); alert( node.getName() ); // "body"
- Returns:
- {CKFinder.dom.element} The parent element.
{CKFinder.dom.node}
insertAfter(node)
Since:
2.0
Inserts this element after a node.
var em = new CKFinder.dom.element( 'em' ); var strong = new CKFinder.dom.element( 'strong' ); strong.insertAfter( em ); // result: "<em></em><strong></strong>"
- Parameters:
- {CKFinder.dom.node} node
- The that will preceed this element.
- Returns:
- {CKFinder.dom.node} The node preceeding this one after insertion.
{CKFinder.dom.node}
insertBefore(node)
Since:
2.0
Inserts this element before a node.
var em = new CKFinder.dom.element( 'em' ); var strong = new CKFinder.dom.element( 'strong' ); strong.insertBefore( em ); // result: "<strong></strong><em></em>"
- Parameters:
- {CKFinder.dom.node} node
- The that will be after this element.
- Returns:
- {CKFinder.dom.node} The node being inserted.
{Undefined}
ltrim()
Since:
2.0
NO EXAMPLE AVAILABLE
{Undefined}
move(target, toStart)
Since:
2.0
NO EXAMPLE AVAILABLE
- Parameters:
- {Undefined} target
- {Undefined} toStart
{Undefined}
remove(preserveChildren)
Since:
2.0
Removes this node from the document DOM.
var element = CKFinder.dom.element.getById( 'MyElement' ); element.remove();
- Parameters:
- {Boolean} preserveChildren Optional
- Indicates that the children elements must remain in the document, removing only the outer tags.
{Undefined}
replace(nodeToReplace)
Since:
2.0
NO EXAMPLE AVAILABLE
- Parameters:
- {Undefined} nodeToReplace
{Undefined}
rtrim()
Since:
2.0
NO EXAMPLE AVAILABLE
{Undefined}
trim()
Since:
2.0
NO EXAMPLE AVAILABLE