|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--Field
|
+--ComponentField
|
+--EditorField
Defined in form/editorfield.js
Requires:
| Field Summary | |
Boolean |
config
Special editor options |
Object |
divEmoticons
The div used to show available emoticons |
Object |
document
The editable document |
Object |
iframe
Holds a reference to the iframe used by the component |
Object |
resizer
Holds resize control variables |
Selection |
selection
Holds an instance of the Selection class. |
Object |
switchMode
The checkbox used to switch between source and WYSIWYG modes |
Object |
textarea
Textarea element used to show the HTML source code |
Boolean |
textMode
Indicates if the component is in source mode (true) or WYSIWYG mode (false) |
<static> Object |
instances
Holds existent EditorField instances, indexed by ID. |
| Fields inherited from class ComponentField |
componentClass
|
| Fields inherited from class Field |
fld, id, name, label, type
|
| Constructor Summary | |
EditorField
(<Object> fld, <Boolean> opts)
The EditorField class contain all the logic to enable WYSIWYG HTML editing in an IFRAME element of the page. |
|
| Method Summary | |
void
|
changeMode(<Boolean> b)
Switch between source and WYSIWYG modes |
<private> String
|
cleanHTML(<String> html)
Remove unwanted properties and style definitions from a given HTML code. |
void
|
clear()
Clean up the component value |
void
|
createLink()
Create or edit a hyperlink in the component. |
void
|
execCommand(<String> cmd, <String> val, <Object> ev)
Execute a given command in the editor's document |
Boolean
|
focus()
Move focus to the editor component |
Array
|
getBrokenImages()
Return an array of broken images included in the editor's document |
String
|
getValue()
Return the contents of the editor as HTML |
String
|
getValueAsText()
Return the contents of the editor as text |
void
|
insertHTML(<String> html)
Inserts HTML code in the current selection of the component |
void
|
insertImage()
Create or edit an image in the component. |
Boolean
|
isEmpty()
Checks if the component value is empty |
Boolean
|
keyHandler(<Object> e)
Handles all keyboard events inside the edit area |
void
|
paste()
Handles the "paste" event in MSIE browsers |
void
|
removeNode(<Object> elm)
Remove a given element from the editor's document |
void
|
resizeHandler(<Event> e)
Mouse move handler used by the resize routine |
void
|
resizeTo(<Number> w, <Number> h)
Resizes the editor area to a given width and a given height. |
String
|
serialize()
Serialize the component so that the value can be used to perform HTTP requests or to build query param strings |
void
|
setDisabled(<Boolean> b)
Disables/enables the component |
void
|
setResizing(<Event> e, <Boolean> b)
This method is called when resizing of the editor are starts (by clicking in the resize image) and ends (when the mouseup event gets called) |
void
|
setup()
Performs all the setup routines of the HTML editor. |
void
|
setupDocument()
Initialize the document with the linked field's value and make it editable. |
void
|
setupEvents()
Configure all necessary event listeners. |
void
|
setupOptions()
Define default values to the editor configuration options |
void
|
setValue(<String> html)
Change the value of the component |
void
|
showHideEmoticons(<Object> ev)
Toggle display status of the emoticons layer |
| Methods inherited from class ComponentField |
raiseEvent
|
| Methods inherited from class Field |
getFormElement, getMask, enable, disable, beforeFocus
|
| Field Detail |
Boolean config
Object divEmoticons
Object document
Object iframe
Object resizer
Selection selection
Object switchMode
Object textarea
Boolean textMode
<static> Object instances
| Constructor Detail |
EditorField(<Object> fld, <Boolean> opts)
fld - Hidden field linked with the HTML editor
opts - Component options
| Method Detail |
void changeMode(<Boolean> b)
b - Flag value
<private> String cleanHTML(<String> html)
html - HTML code
void clear()
void createLink()
void execCommand(<String> cmd, <String> val, <Object> ev)
cmd - Command identifier
val - Command parameter
ev - Event
Boolean focus()
Array getBrokenImages()
String getValue()
String getValueAsText()
void insertHTML(<String> html)
html - Code to be inserted
void insertImage()
Boolean isEmpty()
Boolean keyHandler(<Object> e)
e - Event
void paste()
void removeNode(<Object> elm)
elm - Element to remove
void resizeHandler(<Event> e)
e - Event
void resizeTo(<Number> w, <Number> h)
w - Width
h - Height
String serialize()
void setDisabled(<Boolean> b)
b - Flag value
void setResizing(<Event> e, <Boolean> b)
e - Event
b - Start resizing or end resizing
void setup()
void setupDocument()
void setupEvents()
void setupOptions()
void setValue(<String> html)
html - New value
void showHideEmoticons(<Object> ev)
ev - Event
|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||