APIs

Show:

Methods

attachEventListeners

() Undefined

Initialize all event listeners for the editor.

Returns:

Undefined:

blur

() Undefined

Blur the editor

Returns:

Undefined:

cancelEvent

(
  • evt
)
Boolean

Cancel that event every way we know how.

Parameters:

  • evt Event

    Event object

Returns:

Boolean:

If the event should stop

focus

() Undefined

Focus the editor.

Returns:

Undefined:

focus

() Undefined

Stop the editor's timers.

Returns:

Undefined:

getSelection

() Mixed

Get the current selection if it is within the current editor or undefined if it is not available or outside the current editor

Returns:

Mixed:

A Selection instance or undefined

getStyle

(
  • el
)
Object

Get the computed style of an element.

Parameters:

  • el Element

    Element to pull style from

Returns:

Object:

Style object

getStyleProp

(
  • style
  • prop
)
String

Get the computed style property of an element.

Parameters:

  • style CSSStyleDeclaration | Object

    Style obejct

  • prop String

    Style key to return

Returns:

String:

Style value

initTimers

() Undefined

Initialize the editor's timers.

Returns:

Undefined:

insert

(
  • text
)
Undefined

Insert text at the current selection.

Parameters:

  • text String

    HTML Content

Returns:

Undefined:

insertHtml

(
  • html
)
Undefined

Insert html content into the editor

Parameters:

  • html String

    HTML to be processed and inserted

Returns:

Undefined:

onBlurEditor

(
  • evt
)
Undefined

Parameters:

  • evt Event

    Event object

Returns:

Undefined:

onBold

(
  • evt
)
Undefined

Parameters:

  • evt Event

    Event object

Returns:

Undefined:

onFocusEditor

(
  • evt
)
Undefined

Parameters:

  • evt Event

    Event object

Returns:

Undefined:

onFontSizeChange

(
  • evt
)
Undefined

Parameters:

  • evt Event

    Event object

Returns:

Undefined:

onKeyDown

(
  • evt
)
Undefined

Parameters:

  • evt Event

    Event object

Returns:

Undefined:

onMouseOrKeyUp

(
  • evt
)
Undefined

Parameters:

  • evt Event

    Event object

Returns:

Undefined:

onUnderline

(
  • evt
)
Undefined

Parameters:

  • evt Event

    Event object

Returns:

Undefined:

processHtml

(
  • html
)
String

Internal method for sanitizing the markup.

Parameters:

  • html String

    input html from the edit area

Returns:

String:

processed_html html cleaned and ready for saving

render

(
  • focus
)
system.JTEditorView chainable

Render the view.

Parameters:

  • focus Boolean

    If true then give the view focus.

Returns:

restoreSelection

() Undefined

Restore the selection range to the one saved by saveSelection()

Returns:

Undefined:

saveSelection

() Undefined

Save the current selection range.

Returns:

Undefined:

setControlState

() Undefined

Sets the state of the formatting controls based on the current selection in the editor.

Returns:

Undefined:

setup

(
  • name
  • value
)
Undefined

Setup is required before the view can be rendered.

Parameters:

  • name String

    Name of input

  • value String

    Initial value

Returns:

Undefined:

startTimers

() Undefined

Start the editor's timers.

Returns:

Undefined:

val

(
  • value
)
String

Set or get the value of the editor.

Parameters:

  • value String

    Full value to set

Returns:

String:

The current value after function is complete