AreaEdit

Class HTMLArea

Object
   |
   +--HTMLArea

class HTMLArea


This is the main AreaEdit class the manages the HTML Editors functions. If this is not a supported browser the textarea is left untouched.
Defined in htmlarea.js

See:


Nested Class Summary
<static class> HTMLArea.Config
<static class> HTMLArea.Dialog
 
Field Summary
 Object __htmlarea_id_num
          
 Object _customUndo
          
 Object _editMode
          
 Object _htmlArea
          
 Object _mdoc
          
 Object _notifyListeners
          
 Object _textArea
          
 Object _timerToolbar
          
 Object _timerUndo
          
 Object _undoPos
          
 Object _undoQueue
          
 Object config
          
 Object ddt
          
 Object doctype
          
<private>  Object panels
          
 Object plugins
          
<static>  Object _addClasses
          
<static>  Object _blockTags
          blockTags
<static>  Object _closingTags
          closing tags
<static>  Object _lc_catalog
          
<static>  Object _object
          variable used to pass the object to the popup editor window.
<static>  Object _paraContainerTags
          paragraph container tags
<static>  Object _removeClasses
          
<static>  Object _scripts
          list of scripts to load during init()
<static>  Object addClass
          Alias these for convenience
<static>  Object agt
          
<static>  Object is_gecko
          
<static>  Object is_ie
          
<static>  Object is_mac
          
<static>  Object is_mac_ie
          
<static>  Object is_opera
          
<static>  Object is_win_ie
          
<static>  Object last_on
          
<static>  Object maxloadattempts
          number of times to attempt loading something from the server
<static>  Object plugin_loadattempts
          list of plugin load attempts
<static>  Object RE_body
          
<static>  Object RE_doctype
          
<static>  Object RE_email
          
<static>  Object RE_head
          
<static>  Object RE_Specials
          
<static>  Object RE_tagName
          
<static>  Object RE_url
          
<static>  Object removeClass
          
<static>  Object uniq_count
          uniq_count
 
Constructor Summary
HTMLArea (textarea, config)
            Creates a new HTMLArea object but does not cause it to be displayed.
 
Method Summary
 Object _activeElement(sel)
           _activeElement()
 void _addToolbar()
           _addToolbar()
 Object _ancestorsWithClasses(sel, tag, classes)
          
 void _clearFonts()
           _clearFonts()
 void _comboSelected(el, txt)
           _comboSelected()
 void _createImplicitBlock(type)
           _createImplicitBlock()
 void _createLink(link)
           _createLink()
 Object _createRange(sel)
           _createRange()
 void _createStatusBar()
           _createStatusBar()
 void _createToolbar()
           Creates the toolbar and appends it to the _htmlarea
 void _createToolbar1(editor, toolbar, tb_objects)
           separate from previous createToolBar to allow dynamic change of toolbar
 Object _editorEvent(ev)
           _editorEvent()
 Object _fillStylist()
           Fill the stylist panel with styles that may be applied to the current selection.
 Object _formatBlock(block_format)
           _formatBlock()
 void _fullScreen()
           fullScreen makes an editor take up the full window space (and resizes when the browser is resized) the principle is the same as the "popupwindow" functionality in the original htmlArea, except this one doesn't popup a window (it just uses to positioning hackery) so it's much more reliable and much faster to switch between
 Object _getAncestorBlock(sel)
           _getAncestorBlock()
 Object _getAncestorsClassNames(sel)
          
 Object _getFirstAncestor(sel, types)
           _getFirstAncestor()
 Object _getSelection()
           _getSelection()
 void _insertImage(image)
           _insertImage()
 void _insertTable()
           _insertTable()
 void _popupDialog(url, action, init)
           _popupDialog()
 Object _selectionEmpty(sel)
           _selectionEmpty()
 void _setConfig(config)
           _setConfig()
 void _splitBlock()
           _splitBlock()
 void _stylistAddClasses(el, tag, classes)
           Add the given classes (space seperated list) to the currently selected element (will add a span if none selected)
 void _stylistRemoveClasses(classes, from)
           Remove the given classes (space seperated list) from the given elements (array of elements)
 void _stylistRemoveClassesFull(el, classes)
          
 Object _superClean(opts, obj)
           superClean combines HTMLTidy, Word Cleaning and font stripping into a single function it works a bit differently in how it asks for parameters
 Object _toggleBorders()
           _toggleBorders()
 void _undoTakeSnapshot()
           takes an undo snapshot
 void _wordClean()
           wordclean - clean out MS Word tags?
 void activateEditor()
           activateEditor
 Object addPanel(side)
           addPanel
 Object convertNode(el, newTagName)
           convertNode()
 void deactivateEditor()
           deactivateEditor()
 void debugTree()
           debugTree
 void disableToolbar(except)
           disableToolbar()
 void dom_checkBackspace()
           dom_checkBackspace()
 void dom_checkInsertP()
           dom_checkInsertP()
 void enableToolbar()
           enableToolbar()
 Object execCommand(cmdID, UI, param)
           execCommand()
 Object fixRelativeLinks(html)
           fixRelativeLinks()
 Object focusEditor()
           focusEditor()
 void forceRedraw()
           forceRedraw()
 Object generate()
           Completes the setup of the HTMLArea object and replaces the textarea with it.
 Object getAllAncestors()
           getAllAncestors()
 Object getInnerHTML()
           getInnerHTML()
 Object getInnerSize()
           Size of the htmlArea according to the available space
 Object getParentElement(sel)
           getParentElement()
 Object getSelectedHTML()
           Retrieve the selected block
 Object hasSelectedText()
           hasSelectedText()
 void hidePanel(panel)
           hidePanel
 void hidePanels(sides)
           hidePanels
 Object ie_checkBackspace()
           ie_checkBackspace()
 Object imgURL(file, plugin)
           imgURL()
 Object initIframe()
           initFrame
 void insertHTML(html)
           insertHTML()
 Object insertNodeAtSelection(toBeInserted)
           insertNodeAtSelection()
 Object inwardHtml(html)
           inwardHtml()
 Object inwardSpecialReplacements(html)
           inwardSpecialReplacements()
 void notifyOf(ev, args)
           notifyOf()
 void notifyOn(ev, fn)
           notifyOn()
 Object outwardHtml(html)
           outwardHTML()
 Object outwardSpecialReplacements(html)
           outwardSpecialreplacements()
 Object popupURL(file)
           popupURL()
 void redo()
           redo()
 void registerPanel(side, object)
           registerPanel()
 Object registerPlugin()
           registerPlugin()
 Object registerPlugin2(plugin, args)
           registerPlugin2
 void registerPlugins(plugin_names)
           registerPlugins()
 void removePanel(panel)
           removePanel
 void scrollToElement(e)
           scrollToElement()
 void selectNodeContents(node, pos)
           selectNodeContents()
 void setDoctype(doctype)
           setDoctype()
 Object setFullHTML(html)
           setFullHTML()
 Object setHTML(html)
           setHTML()
 void setInnerSize(width, height)
           setInnerSize
 Object setMode(mode)
           Switches editor mode;
 void showPanel(panel)
           showPanel
 void showPanels(sides)
           showPanels
 Object stripBaseURL(string)
           stripBaseUrl()
 void surroundHTML(startTag, endTag)
           surroundHTML
 Object switchElementTag(el, tag)
           Change the tag of an element
 void undo()
           undo()
 void updateToolbar(noStatus)
           updates enabled/disable/active state of the toolbar elements
<static> void _addClass(el, className)
           _addClass()
<static> void _addEvent(el, evname, func)
           _addEvent()
<static> void _addEvents(el, evs, func)
           _addEvents()
<static> Object _colorToRgb(v)
           _colorToRgb()
<static> void _ddt( file, line, msg )
           ddt shorthand for startup code
<static> void _getback(url, handler)
           _getback()
<static> Object _geturlcontent(url)
           _geturlcontent()
<static> Object _hasClass(el, className)
           _hasClass()
<static> Object _lc(string, context)
           Return a localised string.
<static> void _loadback(src, callback)
           _loadback()
<static> Object _loadlang(context)
           Load a language file.
<static> Object _makeColor(v)
           _makeColor()
<static> void _postback(url, data, handler)
           _postback()
<static> void _removeClass(el, className)
           _removeClass()
<static> void _removeEvent(el, evname, func)
           _removeEvent()
<static> void _removeEvents(el, evs, func)
           _removeEvents()
<static> void _stopEvent(ev)
           _stopEvent()
<static> void addClasses(el, classes)
           addClasses()
<static> Object arrayContainsArray(a1, a2)
           arrayContainsArray()
<static> Object arrayFilter(a1, filterfn)
           arrayFilter()
<static> Object checkSupportedBrowser()
           checkSupportedBrowser()
<static> Object cloneObject(obj)
           returns a clone of the given object
<static> Object collectionToArray(collection)
           collectionToArray()
<static> Object getElementById(tag, id)
           getElementById()
<static> Object getHTML(root, outputRoot, editor)
           getHTML()
<static> Object getHTMLWrapper(root, outputRoot, editor)
           getHTMLWrapper()
<static> Object getInnerText(el)
           getInnerText()
<static> Object getPluginDir(pluginName)
           getPluginDir()
<static> Object hasDisplayedChildren(el)
           hasDisplayedChildren()
<static> Object htmlEncode(str)
           htmlEncode()
<static> void init()
           actually does the scripts loading and fires onLoad handler
<static> Object isBlockElement(el)
           isBlockElement()
<static> Object isParaContainer(el)
           isParaContainer()
<static> Object loadPlugin(pluginName, callback)
           loadPlugin - load a plugin
<static> Object loadPlugins(plugins, callbackIfNotReady)
           loadPlugins
<static> void loadScript(url, plugin)
           loadScript
<static> void loadStyle(style, plugin)
           loadStyle()
<static> Object makeBtnImg(imgDef, doc)
           makeBtnImg()
<static> Object makeEditors(editor_names, default_config, plugin_names)
           makeEditors()
<static> Object needsClosingTag(el)
           needsClosingTag()
<static> Object objectProperties(obj)
           objectProperties
<static> void onload()
           onLoad handler
<static> void refreshPlugin(plugin)
           refresh plugin by calling onGenerate or onGenerateOnce method.
<static> Object removeClasses(el, classes)
           removeClasses()
<static> Object replace(id, config)
           Helper function: replaces the TEXTAREA with the given ID with HTMLArea.
<static> void replaceAll(config)
           replace all TEXTAREA-s in the document with HTMLArea-s.
<static> Object ripStylesFromCSSFile(URL)
          
<static> Object ripStylesFromCSSString(css)
          
<static> void startEditors(editors)
           startEditors() - front end to generate()
<static> Object uniq(prefix)
           uniq()

Field Detail

__htmlarea_id_num

Object __htmlarea_id_num

_customUndo

Object _customUndo

_editMode

Object _editMode

_htmlArea

Object _htmlArea

_mdoc

Object _mdoc

_notifyListeners

Object _notifyListeners

_textArea

Object _textArea

_timerToolbar

Object _timerToolbar

_timerUndo

Object _timerUndo

_undoPos

Object _undoPos

_undoQueue

Object _undoQueue

config

Object config

ddt

Object ddt

doctype

Object doctype

panels

<private> Object panels

plugins

Object plugins

_addClasses

<static> Object _addClasses

_blockTags

<static> Object _blockTags

_closingTags

<static> Object _closingTags

_lc_catalog

<static> Object _lc_catalog

_object

<static> Object _object

_paraContainerTags

<static> Object _paraContainerTags

_removeClasses

<static> Object _removeClasses

_scripts

<static> Object _scripts

addClass

<static> Object addClass

agt

<static> Object agt

is_gecko

<static> Object is_gecko

is_ie

<static> Object is_ie

is_mac

<static> Object is_mac

is_mac_ie

<static> Object is_mac_ie

is_opera

<static> Object is_opera

is_win_ie

<static> Object is_win_ie

last_on

<static> Object last_on

maxloadattempts

<static> Object maxloadattempts

plugin_loadattempts

<static> Object plugin_loadattempts

RE_body

<static> Object RE_body

RE_doctype

<static> Object RE_doctype

RE_email

<static> Object RE_email

RE_head

<static> Object RE_head

RE_Specials

<static> Object RE_Specials

RE_tagName

<static> Object RE_tagName

RE_url

<static> Object RE_url

removeClass

<static> Object removeClass

uniq_count

<static> Object uniq_count

Constructor Detail

HTMLArea

HTMLArea(textarea, config)

Method Detail

_activeElement

Object _activeElement(sel)

_addToolbar

void _addToolbar()

_ancestorsWithClasses

Object _ancestorsWithClasses(sel, tag, classes)

_clearFonts

void _clearFonts()

_comboSelected

void _comboSelected(el, txt)

_createImplicitBlock

void _createImplicitBlock(type)

_createLink

void _createLink(link)

_createRange

Object _createRange(sel)

_createStatusBar

void _createStatusBar()

_createToolbar

void _createToolbar()

_createToolbar1

void _createToolbar1(editor, toolbar, tb_objects)

_editorEvent

Object _editorEvent(ev)

_fillStylist

Object _fillStylist()

_formatBlock

Object _formatBlock(block_format)

_fullScreen

void _fullScreen()

_getAncestorBlock

Object _getAncestorBlock(sel)

_getAncestorsClassNames

Object _getAncestorsClassNames(sel)

_getFirstAncestor

Object _getFirstAncestor(sel, types)

_getSelection

Object _getSelection()

_insertImage

void _insertImage(image)

_insertTable

void _insertTable()

_popupDialog

void _popupDialog(url, action, init)

_selectionEmpty

Object _selectionEmpty(sel)

_setConfig

void _setConfig(config)

_splitBlock

void _splitBlock()

_stylistAddClasses

void _stylistAddClasses(el, tag, classes)

_stylistRemoveClasses

void _stylistRemoveClasses(classes, from)

_stylistRemoveClassesFull

void _stylistRemoveClassesFull(el, classes)

_superClean

Object _superClean(opts, obj)

_toggleBorders

Object _toggleBorders()

_undoTakeSnapshot

void _undoTakeSnapshot()

_wordClean

void _wordClean()

activateEditor

void activateEditor()

addPanel

Object addPanel(side)

convertNode

Object convertNode(el, newTagName)

deactivateEditor

void deactivateEditor()

debugTree

void debugTree()

disableToolbar

void disableToolbar(except)

dom_checkBackspace

void dom_checkBackspace()

dom_checkInsertP

void dom_checkInsertP()

enableToolbar

void enableToolbar()

execCommand

Object execCommand(cmdID, UI, param)

fixRelativeLinks

Object fixRelativeLinks(html)

focusEditor

Object focusEditor()

forceRedraw

void forceRedraw()

generate

Object generate()

getAllAncestors

Object getAllAncestors()

getInnerHTML

Object getInnerHTML()

getInnerSize

Object getInnerSize()

getParentElement

Object getParentElement(sel)

getSelectedHTML

Object getSelectedHTML()

hasSelectedText

Object hasSelectedText()

hidePanel

void hidePanel(panel)

hidePanels

void hidePanels(sides)

ie_checkBackspace

Object ie_checkBackspace()

imgURL

Object imgURL(file, plugin)

initIframe

Object initIframe()

insertHTML

void insertHTML(html)

insertNodeAtSelection

Object insertNodeAtSelection(toBeInserted)

inwardHtml

Object inwardHtml(html)

inwardSpecialReplacements

Object inwardSpecialReplacements(html)

notifyOf

void notifyOf(ev, args)

notifyOn

void notifyOn(ev, fn)

outwardHtml

Object outwardHtml(html)

outwardSpecialReplacements

Object outwardSpecialReplacements(html)

popupURL

Object popupURL(file)

redo

void redo()

registerPanel

void registerPanel(side, object)

registerPlugin

Object registerPlugin()

registerPlugin2

Object registerPlugin2(plugin, args)

registerPlugins

void registerPlugins(plugin_names)

removePanel

void removePanel(panel)

scrollToElement

void scrollToElement(e)

selectNodeContents

void selectNodeContents(node, pos)

setDoctype

void setDoctype(doctype)

setFullHTML

Object setFullHTML(html)

setHTML

Object setHTML(html)

setInnerSize

void setInnerSize(width, height)

setMode

Object setMode(mode)

showPanel

void showPanel(panel)

showPanels

void showPanels(sides)

stripBaseURL

Object stripBaseURL(string)

surroundHTML

void surroundHTML(startTag, endTag)

switchElementTag

Object switchElementTag(el, tag)

undo

void undo()

updateToolbar

void updateToolbar(noStatus)

_addClass

<static> void _addClass(el, className)

_addEvent

<static> void _addEvent(el, evname, func)

_addEvents

<static> void _addEvents(el, evs, func)

_colorToRgb

<static> Object _colorToRgb(v)

_ddt

<static> void _ddt( file, line, msg )

_getback

<static> void _getback(url, handler)

_geturlcontent

<static> Object _geturlcontent(url)

_hasClass

<static> Object _hasClass(el, className)

_lc

<static> Object _lc(string, context)

_loadback

<static> void _loadback(src, callback)

_loadlang

<static> Object _loadlang(context)

_makeColor

<static> Object _makeColor(v)

_postback

<static> void _postback(url, data, handler)

_removeClass

<static> void _removeClass(el, className)

_removeEvent

<static> void _removeEvent(el, evname, func)

_removeEvents

<static> void _removeEvents(el, evs, func)

_stopEvent

<static> void _stopEvent(ev)

addClasses

<static> void addClasses(el, classes)

arrayContainsArray

<static> Object arrayContainsArray(a1, a2)

arrayFilter

<static> Object arrayFilter(a1, filterfn)

checkSupportedBrowser

<static> Object checkSupportedBrowser()

cloneObject

<static> Object cloneObject(obj)

collectionToArray

<static> Object collectionToArray(collection)

getElementById

<static> Object getElementById(tag, id)

getHTML

<static> Object getHTML(root, outputRoot, editor)

getHTMLWrapper

<static> Object getHTMLWrapper(root, outputRoot, editor)

getInnerText

<static> Object getInnerText(el)

getPluginDir

<static> Object getPluginDir(pluginName)

hasDisplayedChildren

<static> Object hasDisplayedChildren(el)

htmlEncode

<static> Object htmlEncode(str)

init

<static> void init()

isBlockElement

<static> Object isBlockElement(el)

isParaContainer

<static> Object isParaContainer(el)

loadPlugin

<static> Object loadPlugin(pluginName, callback)

loadPlugins

<static> Object loadPlugins(plugins, callbackIfNotReady)

loadScript

<static> void loadScript(url, plugin)

loadStyle

<static> void loadStyle(style, plugin)

makeBtnImg

<static> Object makeBtnImg(imgDef, doc)

makeEditors

<static> Object makeEditors(editor_names, default_config, plugin_names)

needsClosingTag

<static> Object needsClosingTag(el)

objectProperties

<static> Object objectProperties(obj)

onload

<static> void onload()

refreshPlugin

<static> void refreshPlugin(plugin)

removeClasses

<static> Object removeClasses(el, classes)

replace

<static> Object replace(id, config)

replaceAll

<static> void replaceAll(config)

ripStylesFromCSSFile

<static> Object ripStylesFromCSSFile(URL)

ripStylesFromCSSString

<static> Object ripStylesFromCSSString(css)

startEditors

<static> void startEditors(editors)

uniq

<static> Object uniq(prefix)

AreaEdit

Documentation generated by JSDoc on Mon Jun 13 20:27:40 2005