Class TinyMCE_Engine

Object
   |
   +--TinyMCE_Engine

class TinyMCE_Engine

Defined in TinyMCE_Engine.class.js


Field Summary
 Object buttonMap
          
 Object configs
          
 Object currentConfig
          
 Object dialogCounter
          
 Object eventHandlers
          
 Object idCounter
          
 Object instances
          
 Object isGecko
          
 Object isLoaded
          
 Object isMac
          
 Object isMSIE
          
 Object isMSIE5
          
 Object isMSIE5_0
          
 Object isNS7
          
 Object isNS71
          
 Object isOpera
          
 Object isSafari
          
 Object loadedFiles
          
 Object loadedPlugins
          
 Object majorVersion
          
 Object minorVersion
          
 Object plugins
          
 Object releaseDate
          
 Object switchClassCache
          
 Object themes
          
 Object windowArgs
          
 
Constructor Summary
TinyMCE_Engine ()
            Core engine class for TinyMCE, a instance of this class is available as a global called tinyMCE.
 
Method Summary
 HTMLElement _getElementById(<string> id)
           Returns a element by id, this will also search the form names to match the id.
 Object accessibleEventHandler(<DOMEvent> e)
           Accessibility handler that gets executed when the user hits a key in a select element.
 void addButtonMap(<string> m)
           Adds a list of buttons available in the tiled button image used by the button_tile_map option.
 void addEvent(<HTMLElement> o, <string> n, <function> h)
           Adds a event handler function to the specified object.
 void addEventHandlers(<string> editor_id)
           Adds the handleEvent function to the specified editor instance.
 void addMCEControl(<HTMLElement> replace_element, <string> form_element_name, <DOMDocument> target_document)
           Adds a TinyMCE editor control instance to a specific form element.
 void addPlugin(n, <TinyMCE_Plugin> p)
           Adds the specified plugin to the list of loaded plugins, this will also setup the baseURL property of the plugin.
 Object addSelectAccessibility(<DOMEvent> e, <HTMLElement> s, <DOMWindow> w)
           Adds accessibility keydown handler to the specified select element.
 void addTheme(&l<TinyMCE_Theme> t;string> n, t)
           Adds the specified theme in to the list of loaded themes.
 void addToLang(<string> prefix, <Array> ar)
           Adds language items to the global language array.
 string applyTemplate(<string> h, <Array> as)
           Replaces language, args and settings variables in a HTML string.
 boolean callFunc(<<<Array> a href="TinyMCE_Control.html">TinyMCE_Control> ins, <string> p, <string> n, <int> m, a)
           Executes callback chain.
 void cancelEvent(<DOMEvent> e)
           Cancels the specified event, this will disable the event from be passed to other listeners in event chain.
 void cleanupAnchors(<DOMDocument> doc)
           Moves the contents of a anchor outside and after the anchor.
 string cleanupEventStr(<string> s)
           Removes MSIE 5.5 specific event wrapper function form a event string.
 string cleanupHTMLCode(<string> s)
           Makes some preprocessing cleanup routines on the specified HTML string.
 Array clearArray(a)
           Returns a cleared array, since some external libraries tend to extend the Array core object arrays needs to be cleaned from these extended functions.
 void closeWindow(<DOMWindow> win)
           Closes the specified window.
 void compressStyle(<Array> ar, <string> pr, <string> sf, <string> res)
           Compresses larger styles into a smaller.
 void confirmAdd(<DOMEvent> e, <Array> settings)
           Displays a confirm dialog when a user clicks/focus a textarea that is to be converted into a TinyMCE instance.
 string convertAbsoluteURLToRelativeURL(<string> base_url, <string> url_to_relative)
           Converts an absolute path to relative path.
 void convertAllRelativeURLs(<HTMLElement> body)
           Converts all img and a element URLs to absolute URLs.
 void convertFontsToSpans(<DOMDocument> doc)
           Convers fonts to spans in the specified document.
 string convertHexToRGB(<string> s)
           Returns a rgb(n,n,n) string from a hexadecimal value.
 string convertRelativeToAbsoluteURL(<string> base_url, <string> relative_url)
           Converts an relative path to absolute path.
 string convertRGBToHex(<string> s, <boolean> k)
           Returns a hexadecimal version of the specified rgb(1,2,3) string.
 void convertSpansToFonts(<DOMDocument> doc)
           Converts span elements to font elements in the specified document instance.
 string convertURL(<string> url, <HTMLElement> node, <boolean> on_save)
           Converts the specified URL based in TinyMCE configuration settings.
 void debug()
           Debugs the specified message to a screen.
 Object dispatchCallback(<TinyMCE_Control> i, <string> p, <string> n)
           Dispatches the specified callback on all options, plugins and themes.
 string entityDecode(<string> s)
           HTML entity decode a string, replaces < with <.
 object evalFunc(<string> f, <int> idx, <Array> a)
           Evaluates the specified function and uses the array of arguments.
 void execCommand(<string> command, <boolean> user_interface, <object> value)
           Executes a command on the selected or last selected TinyMCE editor control instance.
 Object execCommandCallback(<TinyMCE_Control> i, <string> p, <string> n)
           Executes the specified execcommand callback on all options, plugins and themes.
 void execInstanceCommand(<string> editor_id, <string> command, <boolean> user_interface, <object> value, <boolean> focus)
           Executes a command on a specific editor instance by id.
 Object executeCallback(<TinyMCE_Control> i, <string> p, <string> n)
           Executes the specified callback on all options, plugins and themes.
 string fixGeckoBaseHREFBug(<boolean> m, <HTMLElement> e, <string> h)
           Fixes a Gecko specific bug where href, src attribute values gets converted incorrectly when inserted into editor.
 TinyMCE_ElementPosition getAbsPosition(<HTMLNode> n)
           Returns the absolute x, y position of a node.
 string getAttrib(<HTMLElement> elm, <string> name, <string> default_value)
           Returns the attribute value of a element or the default value if it wasn't found.
 string getButtonHTML(<string> id, <string> lang, <string> img, <string> cmd, <string> ui, <string> val)
           Returns the HTML code for a normal button control.
 string getContent(<string> editor_id)
           Returns the HTML contents of the specified editor instance id.
 string getControlHTML(<string> c)
           Returns the HTML for the specified control this will loop through the theme and all plugins inorder to find the control.
 Array getCSSClasses(<string> editor_id, <DOMDocument> doc)
           Returns a array of CSS classes that is available in a document.
 string getEditorId(<string> form_element)
           Returns the editor instance id of a specific form element.
 HTMLElement getElementByAttributeValue(<HTMLElement> n, <string> e, <string> a, <string> v)
           Returns a element by a specific attribute and it's value.
 Array getElementsByAttributeValue(<HTMLElement> n, <string> e, <string> a, <string> v)
           Returns a element array by a specific attribute and it's value.
 TinyMCE_Control getInstanceById(<string> editor_id)
           Returns a TinyMCE editor instance by the specified editor id or null if it wasn't found.
 object getLang(<string> name, <string> default_value, <boolean> parse_entities)
           Returns a language variable value from the language packs.
 Array getNodeTree(&l<int> t;HTMLNode> n, <Array> na, t, <string> nn)
           Returns a array of nodes selected retrived from the child nodes of the specified node.
 string getOuterHTML(<HTMLElement> e)
           Returns the outer HTML of a element, this uses the outerHTML property in MSIE and Opera and a workaround for Gecko.
 object getParam(<string> name, <string> default_value, <boolean> strip_whitespace, <string> split_chr)
           Returns a specific configuration setting or the default value if it wasn't found.
 HTMLElement getParentBlockElement(<HTMLNode> n)
           Returns the first block element parent of the specified node.
 HTMLElement getParentElement(<HTMLNode> node, <string> names, <string> attrib_name, <string> attrib_value)
           Returns the parent element of the specified node based on the search criteria.
 string getVisualAidClass(<string> class_name, <boolean> state)
           Returns the visual aid class string, this will add/remove the visual aid class.
 Object getWindowArg(<string> n, d)
           Returns the window argument to be passed to TinyMCE popup.
 boolean handleEvent(<DOMEvent> e)
           Event handler function that gets executed each time a event occurs in a TinyMCE editor control instance.
 void handleVisualAid(<HTMLElement> el, <boolean> deep, <boolean> state, <TinyMCE_Control> inst)
           Adds visual aid classes to all elements that need them recursive in the DOM tree.
 boolean hasPlugin(<string> n)
           Returns true/false if the specified plugin is loaded or not.
 boolean hasTheme(<string> n)
           Returns true/false if the specified theme is loaded or not.
 void importCSS(<DOMDocument> doc, <string> css_file)
           Imports a CSS file into a allready loaded document.
 void importPluginLanguagePack(<string> name, <string> valid_languages)
           Loads a plugin specific language pack.
 void importThemeLanguagePack(<string> name)
           Loads a theme specific language pack.
 void init(settings)
           Initializes TinyMCE with the specific configuration settings.
 void insertAfter(<HTMLNode> n, <HTMLNode> r)
           Inserts a node after the specific node.
 boolean isBlockElement(<HTMLNode> n)
           Returns true/false if the specified node is a block element or not.
 boolean isInstance(<object> o)
           Returns true/false if a specific object is a TinyMCE_Control instance or not.
 void loadCSS(<string> url)
           Loads the specified CSS by writing the a link tag to the current page.
 void loadScript(<string> url)
           Loads the specified script by writing the a script tag to the current page.
 boolean onLoad()
           Gets executed when the page loads or get intitialized.
 void onMouseMove()
           Mouse move handler function, this will be executed each time the mouse is moved within a editor instance.
 void openWindow(<Array> template, <Array> args)
           Opens a popup window based in the specified input data.
 Array parseStyle(<string> str)
           Parses the specified HTML style data.
 TinyMCE_URL_Item parseURL(<string> url_str)
           Parses a URL in to its diffrent components.
 boolean queryInstanceCommandState(<string> editor_id, <string> command)
           Queries a command state for a specific command on a specific editor instance.
 object queryInstanceCommandValue(<string> editor_id, <string> command)
           Queries a command value for a specific command on a specific editor instance.
 string regexpReplace(<string> in_str, <string> reg_exp, <string> replace_str, opts)
           Regexp replaces the contents of a string.
 void removeMCEControl(<string> editor_id)
           Removes a TinyMCE editor control instance by id.
 void removeTinyMCEFormElements(<HTMLElement> form_obj)
           Removes/disables TinyMCE built in form elements such as select boxes for font sizes etc.
 string replaceVar(<string> h, <string> r, <string> v)
           Replaces a specific variable in the string with a nother string.
 void resetForm(<int> form_index)
           Resets a forms TinyMCE instances based on form index.
 string serializeStyle(<Array> ar)
           Serializes the specified style item name/value array into a HTML string.
 string serializeURL(<TinyMCE_URL_Item> up)
           Serializes the specified URL object into a string.
 void setAttrib(<HTMLElement> element, <string> name, <string> value, <boolean> fix_value)
           Sets the attribute value for a specific attribute.
 void setContent(<string> h)
           Sets the HTML contents of the selected editor instance.
 void setInnerHTML(<HTMLElement> e, <string> h)
           Sets the innerHTML property of a element, this function also fixes a MSIE bug where the first comment is removed.
 void setOuterHTML(<HTMLElement> e, <string> h)
           Sets the outer HTML of a element, this uses the outerHTML property in MSIE and Opera and a workaround for Gecko.
 void setPluginBaseURL(<string> n, <string> u)
           Sets the baseURL of the specified plugin, this is useful if the plugin is loaded from a external location.
 void setStyleAttrib(<HTMLElement> elm, <string> name, <string> value)
           Sets a style attribute item value.
 void setupContent(<string> editor_id)
           Setups the contents of TinyMCE editor instance and fills it with contents.
 void setWindowArg(<string> n, <string> v)
           Sets the window argument to be passed to TinyMCE popup.
 string storeAwayURLs(<string> s)
           Stores away the src and href attribute values in separate mce_src and mce_href attributes.
 void submitPatch()
           Piggyback onsubmit event handler function, this will remove/hide the TinyMCE specific form elements call triggerSave to fill the textarea with the correct contents then call the old piggy backed event handler.
 void switchClass(<HTMLElement> ei, <string> c)
           Switches the CSS class of the specified element.
 void triggerNodeChange(<boolean> focus, <boolean> setup_content)
           Triggers a nodeChange event to every theme and plugin.
 void triggerSave(<boolean> skip_cleanup, <boolean> skip_callback)
           Moves the contents from a TinyMCE editor control instance to the hidden textarea that got replaced with TinyMCE.
 string trim(<string> s)
           Removes all prefix, suffix whitespace of a string.
 void unloadHandler()
           Unload document event handler function.
 void updateContent(<string> form_element_name)
           Moves the contents from the hidden textarea to the editor that gets inserted.

Field Detail

buttonMap

Object buttonMap

configs

Object configs

currentConfig

Object currentConfig

dialogCounter

Object dialogCounter

eventHandlers

Object eventHandlers

idCounter

Object idCounter

instances

Object instances

isGecko

Object isGecko

isLoaded

Object isLoaded

isMac

Object isMac

isMSIE

Object isMSIE

isMSIE5

Object isMSIE5

isMSIE5_0

Object isMSIE5_0

isNS7

Object isNS7

isNS71

Object isNS71

isOpera

Object isOpera

isSafari

Object isSafari

loadedFiles

Object loadedFiles

loadedPlugins

Object loadedPlugins

majorVersion

Object majorVersion

minorVersion

Object minorVersion

plugins

Object plugins

releaseDate

Object releaseDate

switchClassCache

Object switchClassCache

themes

Object themes

windowArgs

Object windowArgs

Constructor Detail

TinyMCE_Engine

TinyMCE_Engine()

Method Detail

_getElementById

HTMLElement _getElementById(<string> id)

accessibleEventHandler

Object accessibleEventHandler(<DOMEvent> e)

addButtonMap

void addButtonMap(<string> m)

addEvent

void addEvent(<HTMLElement> o, <string> n, <function> h)

addEventHandlers

void addEventHandlers(<string> editor_id)

addMCEControl

void addMCEControl(<HTMLElement> replace_element, <string> form_element_name, <DOMDocument> target_document)

addPlugin

void addPlugin(n, <TinyMCE_Plugin> p)

addSelectAccessibility

Object addSelectAccessibility(<DOMEvent> e, <HTMLElement> s, <DOMWindow> w)

addTheme

void addTheme(&l<TinyMCE_Theme> t;string> n, t)

addToLang

void addToLang(<string> prefix, <Array> ar)

applyTemplate

string applyTemplate(<string> h, <Array> as)

callFunc

boolean callFunc(<<<Array> a href="TinyMCE_Control.html">TinyMCE_Control> ins, <string> p, <string> n, <int> m, a)

cancelEvent

void cancelEvent(<DOMEvent> e)

cleanupAnchors

void cleanupAnchors(<DOMDocument> doc)

cleanupEventStr

string cleanupEventStr(<string> s)

cleanupHTMLCode

string cleanupHTMLCode(<string> s)

clearArray

Array clearArray(a)

closeWindow

void closeWindow(<DOMWindow> win)

compressStyle

void compressStyle(<Array> ar, <string> pr, <string> sf, <string> res)

confirmAdd

void confirmAdd(<DOMEvent> e, <Array> settings)

convertAbsoluteURLToRelativeURL

string convertAbsoluteURLToRelativeURL(<string> base_url, <string> url_to_relative)

convertAllRelativeURLs

void convertAllRelativeURLs(<HTMLElement> body)

convertFontsToSpans

void convertFontsToSpans(<DOMDocument> doc)

convertHexToRGB

string convertHexToRGB(<string> s)

convertRelativeToAbsoluteURL

string convertRelativeToAbsoluteURL(<string> base_url, <string> relative_url)

convertRGBToHex

string convertRGBToHex(<string> s, <boolean> k)

convertSpansToFonts

void convertSpansToFonts(<DOMDocument> doc)

convertURL

string convertURL(<string> url, <HTMLElement> node, <boolean> on_save)

debug

void debug()

dispatchCallback

Object dispatchCallback(<TinyMCE_Control> i, <string> p, <string> n)

entityDecode

string entityDecode(<string> s)

evalFunc

object evalFunc(<string> f, <int> idx, <Array> a)

execCommand

void execCommand(<string> command, <boolean> user_interface, <object> value)

execCommandCallback

Object execCommandCallback(<TinyMCE_Control> i, <string> p, <string> n)

execInstanceCommand

void execInstanceCommand(<string> editor_id, <string> command, <boolean> user_interface, <object> value, <boolean> focus)

executeCallback

Object executeCallback(<TinyMCE_Control> i, <string> p, <string> n)

fixGeckoBaseHREFBug

string fixGeckoBaseHREFBug(<boolean> m, <HTMLElement> e, <string> h)

getAbsPosition

TinyMCE_ElementPosition getAbsPosition(<HTMLNode> n)

getAttrib

string getAttrib(<HTMLElement> elm, <string> name, <string> default_value)

getButtonHTML

string getButtonHTML(<string> id, <string> lang, <string> img, <string> cmd, <string> ui, <string> val)

getContent

string getContent(<string> editor_id)

getControlHTML

string getControlHTML(<string> c)

getCSSClasses

Array getCSSClasses(<string> editor_id, <DOMDocument> doc)

getEditorId

string getEditorId(<string> form_element)

getElementByAttributeValue

HTMLElement getElementByAttributeValue(<HTMLElement> n, <string> e, <string> a, <string> v)

getElementsByAttributeValue

Array getElementsByAttributeValue(<HTMLElement> n, <string> e, <string> a, <string> v)

getInstanceById

TinyMCE_Control getInstanceById(<string> editor_id)

getLang

object getLang(<string> name, <string> default_value, <boolean> parse_entities)

getNodeTree

Array getNodeTree(&l<int> t;HTMLNode> n, <Array> na, t, <string> nn)

getOuterHTML

string getOuterHTML(<HTMLElement> e)

getParam

object getParam(<string> name, <string> default_value, <boolean> strip_whitespace, <string> split_chr)

getParentBlockElement

HTMLElement getParentBlockElement(<HTMLNode> n)

getParentElement

HTMLElement getParentElement(<HTMLNode> node, <string> names, <string> attrib_name, <string> attrib_value)

getVisualAidClass

string getVisualAidClass(<string> class_name, <boolean> state)

getWindowArg

Object getWindowArg(<string> n, d)

handleEvent

boolean handleEvent(<DOMEvent> e)

handleVisualAid

void handleVisualAid(<HTMLElement> el, <boolean> deep, <boolean> state, <TinyMCE_Control> inst)

hasPlugin

boolean hasPlugin(<string> n)

hasTheme

boolean hasTheme(<string> n)

importCSS

void importCSS(<DOMDocument> doc, <string> css_file)

importPluginLanguagePack

void importPluginLanguagePack(<string> name, <string> valid_languages)

importThemeLanguagePack

void importThemeLanguagePack(<string> name)

init

void init(settings)

insertAfter

void insertAfter(<HTMLNode> n, <HTMLNode> r)

isBlockElement

boolean isBlockElement(<HTMLNode> n)

isInstance

boolean isInstance(<object> o)

loadCSS

void loadCSS(<string> url)

loadScript

void loadScript(<string> url)

onLoad

boolean onLoad()

onMouseMove

void onMouseMove()

openWindow

void openWindow(<Array> template, <Array> args)

parseStyle

Array parseStyle(<string> str)

parseURL

TinyMCE_URL_Item parseURL(<string> url_str)

queryInstanceCommandState

boolean queryInstanceCommandState(<string> editor_id, <string> command)

queryInstanceCommandValue

object queryInstanceCommandValue(<string> editor_id, <string> command)

regexpReplace

string regexpReplace(<string> in_str, <string> reg_exp, <string> replace_str, opts)

removeMCEControl

void removeMCEControl(<string> editor_id)

removeTinyMCEFormElements

void removeTinyMCEFormElements(<HTMLElement> form_obj)

replaceVar

string replaceVar(<string> h, <string> r, <string> v)

resetForm

void resetForm(<int> form_index)

serializeStyle

string serializeStyle(<Array> ar)

serializeURL

string serializeURL(<TinyMCE_URL_Item> up)

setAttrib

void setAttrib(<HTMLElement> element, <string> name, <string> value, <boolean> fix_value)

setContent

void setContent(<string> h)

setInnerHTML

void setInnerHTML(<HTMLElement> e, <string> h)

setOuterHTML

void setOuterHTML(<HTMLElement> e, <string> h)

setPluginBaseURL

void setPluginBaseURL(<string> n, <string> u)

setStyleAttrib

void setStyleAttrib(<HTMLElement> elm, <string> name, <string> value)

setupContent

void setupContent(<string> editor_id)

setWindowArg

void setWindowArg(<string> n, <string> v)

storeAwayURLs

string storeAwayURLs(<string> s)

submitPatch

void submitPatch()

switchClass

void switchClass(<HTMLElement> ei, <string> c)

triggerNodeChange

void triggerNodeChange(<boolean> focus, <boolean> setup_content)

triggerSave

void triggerSave(<boolean> skip_cleanup, <boolean> skip_callback)

trim

string trim(<string> s)

unloadHandler

void unloadHandler()

updateContent

void updateContent(<string> form_element_name)


Documentation generated by JSDoc on Fri Feb 24 13:38:20 2006