Code Index | File Index

Namespaces

Classes


Class CKEDITOR.dom.document


Defined in: core/dom/document.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Represents a DOM document.
Method Summary
Method Attributes Method Name and Description
 
appendStyleSheet(cssFileUrl)
Appends a CSS file to the document.
 
equals(object)
Determines whether the specified object is equal to the current object.
 
Gets the <body> element for this document.
 
getById(elementId)
Gets and element based on its id.
 
Gets the <head> element for this document.
Class Detail
CKEDITOR.dom.document(document)
Since: 3.0
Represents a DOM document.
// Create a new <span> element.
var document = new CKEDITOR.dom.document( document );
Parameters:
{Object} document
A native DOM document.
Method Detail
{undefined} appendStyleSheet(cssFileUrl)
Since: 3.0
Appends a CSS file to the document.
CKEDITOR.document.appendStyleSheet( '/mystyles.css' );
Parameters:
{String} cssFileUrl
The CSS file URL.

{Boolean} equals(object)
Since: 3.0
Determines whether the specified object is equal to the current object.
var doc = new CKEDITOR.dom.document( document );
alert( doc.equals( CKEDITOR.document ) );  // "true"
alert( doc == CKEDITOR.document );         // "false"
Parameters:
{Object} object
The object to compare with the current object.
Returns:
{Boolean} "true" if the object is equal.

{CKEDITOR.dom.element} getBody()
Since: 3.0
Gets the <body> element for this document.
var element = CKEDITOR.document.getBody();
alert( element.getName() );  // "body"
Returns:
{CKEDITOR.dom.element} The <body> element.

{CKEDITOR.dom.element} getById(elementId)
Since: 3.0
Gets and element based on its id.
var element = CKEDITOR.document.getById( 'myElement' );
alert( element.getId() );  // "myElement"
Parameters:
{String} elementId
The element id.
Returns:
{CKEDITOR.dom.element} The element instance, or null if not found.

{CKEDITOR.dom.element} getHead()
Since: 3.0
Gets the <head> element for this document.
var element = CKEDITOR.document.getHead();
alert( element.getName() );  // "head"
Returns:
{CKEDITOR.dom.element} The <head> element.

Documentation generated by JsDoc Toolkit