PHP2Go Javascript Framework

Class EditorField

Object
   |
   +--Field
         |
         +--ComponentField
               |
               +--EditorField

class EditorField
extends ComponentField

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

config

Boolean config

divEmoticons

Object divEmoticons

document

Object document

iframe

Object iframe

resizer

Object resizer

selection

Selection selection

switchMode

Object switchMode

textarea

Object textarea

textMode

Boolean textMode

instances

<static> Object instances

Constructor Detail

EditorField

EditorField(<Object> fld, <Boolean> opts)

Method Detail

changeMode

void changeMode(<Boolean> b)

cleanHTML

 <private> String cleanHTML(<String> html)

clear

void clear()

createLink

void createLink()

execCommand

void execCommand(<String> cmd, <String> val, <Object> ev)

focus

Boolean focus()

getBrokenImages

Array getBrokenImages()

getValue

String getValue()

getValueAsText

String getValueAsText()

insertHTML

void insertHTML(<String> html)

insertImage

void insertImage()

isEmpty

Boolean isEmpty()

keyHandler

Boolean keyHandler(<Object> e)

paste

void paste()

removeNode

void removeNode(<Object> elm)

resizeHandler

void resizeHandler(<Event> e)

resizeTo

void resizeTo(<Number> w, <Number> h)

serialize

String serialize()

setDisabled

void setDisabled(<Boolean> b)

setResizing

void setResizing(<Event> e, <Boolean> b)

setup

void setup()

setupDocument

void setupDocument()

setupEvents

void setupEvents()

setupOptions

void setupOptions()

setValue

void setValue(<String> html)

showHideEmoticons

void showHideEmoticons(<Object> ev)

PHP2Go Javascript Framework

Copyright © 2002-2006 by Marcos Pont
Documentation generated by JSDoc on Sun Oct 7 19:52:10 2007