system.JTEditorView Class
/var/www/azaleahealth.com/branches/docs/source_repo/awa/resources/apps/js/system/JTEditorView.js:217
Item Index
Methods
attachEventListeners
()
Undefined
Initialize all event listeners for the editor.
Returns:
blur
()
Undefined
Blur the editor
Returns:
cancelEvent
-
evt
Cancel that event every way we know how.
Parameters:
-
evtEventEvent object
Returns:
If the event should stop
focus
()
Undefined
Focus the editor.
Returns:
focus
()
Undefined
Stop the editor's timers.
Returns:
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:
A Selection instance or undefined
getStyle
-
el
Get the computed style of an element.
Parameters:
-
elElementElement to pull style from
Returns:
Style object
getStyleProp
-
style -
prop
Get the computed style property of an element.
Parameters:
-
styleCSSStyleDeclaration | ObjectStyle obejct
-
propStringStyle key to return
Returns:
Style value
initTimers
()
Undefined
Initialize the editor's timers.
Returns:
insert
-
text
Insert text at the current selection.
Parameters:
-
textStringHTML Content
Returns:
insertHtml
-
html
Insert html content into the editor
Parameters:
-
htmlStringHTML to be processed and inserted
Returns:
onBlurEditor
-
evt
Parameters:
-
evtEventEvent object
Returns:
onBold
-
evt
Parameters:
-
evtEventEvent object
Returns:
onFocusEditor
-
evt
Parameters:
-
evtEventEvent object
Returns:
onFontSizeChange
-
evt
Parameters:
-
evtEventEvent object
Returns:
onKeyDown
-
evt
Parameters:
-
evtEventEvent object
Returns:
onMouseOrKeyUp
-
evt
Parameters:
-
evtEventEvent object
Returns:
onUnderline
-
evt
Parameters:
-
evtEventEvent object
Returns:
processHtml
-
html
Internal method for sanitizing the markup.
Parameters:
-
htmlStringinput html from the edit area
Returns:
processed_html html cleaned and ready for saving
render
-
focus
Render the view.
Parameters:
-
focusBooleanIf true then give the view focus.
Returns:
this
restoreSelection
()
Undefined
Restore the selection range to the one saved by saveSelection()
Returns:
saveSelection
()
Undefined
Save the current selection range.
Returns:
setControlState
()
Undefined
Sets the state of the formatting controls based on the current selection in the editor.
Returns:
setup
-
name -
value
Setup is required before the view can be rendered.
Parameters:
-
nameStringName of input
-
valueStringInitial value
Returns:
startTimers
()
Undefined
Start the editor's timers.
Returns:
val
-
value
Set or get the value of the editor.
Parameters:
-
valueStringFull value to set
Returns:
The current value after function is complete