Class: Editor

RichFaces.ui. Editor

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
Source:

Extends

Members

name :string

Component name.
Type:
  • string
Inherited From:
Source:

Methods

(static) getValue() → {string}

Get current value
Source:
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
Source:

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
Source:

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
Source:
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
Source:
Returns:
true if the editor is in a dirty state
Type
boolean

isFocused() → {boolean}

Returns true if the component is focused
Source:
Returns:
true if the editor is focused
Type
boolean

isReadOnly() → {boolean}

Returns true if the editor is read-only
Source:
Returns:
true if the editor is read-only
Type
boolean

isValueChanged() → {boolean}

Returns true of the value has changed from default
Source:
Returns:
true if the value is changed
Type
boolean

setReadOnly(readOnly)

Set the readonly state
Parameters:
Name Type Description
readOnly boolean the new state
Source:

setValue(value)

Set value
Parameters:
Name Type Description
value string new value
Source:

toString() → {string}

Method for converting object to string
Inherited From:
Source:
Returns:
Type
string