new Editor(componentId, options, config)
Backing object for rich:editor
Parameters:
Name | Type | Description |
---|---|---|
componentId |
string | component id |
options |
object | editor options |
config |
object | CKeditor configuration |
Extends
Members
name :string
Component name.
Type:
- string
- Inherited From:
- Source:
Methods
(static) getValue() → {string}
Get current value
Returns:
current value
- Type
- string
attachToDom(source) → {DOMElement}
Attach component object to DOM element by component id, DOM element or jQuery object and returns the element
Its required for the client side API calls and to clean up after ajax request or document unload by
calling destroy method
Parameters:
Name | Type | Description |
---|---|---|
source |
string | DOMElement | jQuery | component id, DOM element or DOM elements wrapped by jQuery |
- Inherited From:
- Source:
Returns:
- Type
- DOMElement
blur()
Remove focus from this component
destroy()
Destroy method. Will be called before remove component from the page
- Inherited From:
- Source:
detach(source)
Detach component object from DOM element by component id, DOM element or jQuery object
Parameters:
Name | Type | Description |
---|---|---|
source |
string | DOMElement | jQuery | component id, DOM element or DOM elements wrapped by jQuery |
- Inherited From:
- Source:
focus()
Set focus to this component
focus() → {boolean}
Returns true if the component is in editing state
- Source:
Returns:
true if the component is in editing state
- Type
- boolean
getEditor() → {CKEDITOR}
Get the CKEditor object instance
Returns:
CKEditor instance
- Type
- CKEDITOR
getEventElement() → {string}
Method returns element's id for event handlers binding.
Event API calls this method when binding by component object as selector was used.
- Inherited From:
- Source:
Returns:
- Type
- string
invokeEvent(eventType, element, event, data) → {boolean}
Invokes event on on the DOM element
Parameters:
Name | Type | Description |
---|---|---|
eventType |
string | event type, e.g. "click" |
element |
DOMElement | DOM element object |
event |
Event | jQuery Event |
data |
Object | additional data used for event handler |
- Inherited From:
- Source:
Returns:
true if an event is successfully invoked
- Type
- boolean
isDirty() → {boolean}
Returns true if the editor is in a dirty state, i.e. edited since last receiving focus
Returns:
true if the editor is in a dirty state
- Type
- boolean
isFocused() → {boolean}
Returns true if the component is focused
Returns:
true if the editor is focused
- Type
- boolean
isReadOnly() → {boolean}
Returns true if the editor is read-only
Returns:
true if the editor is read-only
- Type
- boolean
isValueChanged() → {boolean}
Returns true of the value has changed from default
Returns:
true if the value is changed
- Type
- boolean
setReadOnly(readOnly)
Set the readonly state
Parameters:
Name | Type | Description |
---|---|---|
readOnly |
boolean | the new state |
setValue(value)
Set value
Parameters:
Name | Type | Description |
---|---|---|
value |
string | new value |
toString() → {string}
Method for converting object to string
- Inherited From:
- Source:
Returns:
- Type
- string