Class CKFinder.dialog.definition.html
Extends
CKFinder.dialog.definition.uiElement.
Constructor Attributes | Constructor Name and Description |
---|---|
The definition of a raw HTML element.
|
Field Attributes | Field Name and Description |
---|---|
(Required) HTML code of this element.
|
- Fields borrowed from class CKFinder.dialog.definition.uiElement:
- accessKey, className, hidden, id, onBlur, onChange, onClick, onDblclick, onFocus, onHide, onKeyDown, onKeypress, onKeyup, onLoad, onMousedown, onMouseout, onMouseover, onMouseup, onShow, style, title, type
Class Detail
CKFinder.dialog.definition.html()
Since:
2.0
The definition of a raw HTML element.
To access HTML elements use CKFinder.dom.document#getById
This class is not really part of the API. It just illustrates the properties
that developers can use to define and create elements made from raw HTML code.
Once the dialog is opened, the created element becomes a CKFinder.ui.dialog.html object and can be accessed with CKFinder.dialog#getContentElement.
For a complete example of dialog definition, please check CKFinder.dialog.add.Once the dialog is opened, the created element becomes a CKFinder.ui.dialog.html object and can be accessed with CKFinder.dialog#getContentElement.
To access HTML elements use CKFinder.dom.document#getById
// There is no constructor for this class, the user just has to define an // object with the appropriate properties. // Example 1: { type : 'html', html : '<h3>This is some sample HTML content.</h3>' }
// Example 2: // Complete sample with document.getById() call when the "Ok" button is clicked. var dialogDefinition = { title : 'Sample dialog', minWidth : 300, minHeight : 200, onOk : function() { // "this" is now a CKFinder.dialog object. var document = this.getElement().getDocument(); // document = CKFinder.dom.document var element = document.getById( 'myDiv' ); if ( element ) alert( element.getHtml() ); }, contents : [ { id : 'tab1', label : '', title : '', elements : [ { type : 'html', html : '<div id="myDiv">Sample <b>text</b>.</div><div id="otherId">Another div.</div>' }, ] } ], buttons : [ CKFinder.dialog.cancelButton, CKFinder.dialog.okButton ] };
Field Detail
{String}
html
Since:
2.0
(Required) HTML code of this element.