<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<model>

<namespace fullname="tinymce" name="tinymce">

<description>Root level namespace this contains classes directly releated to the TinyMCE editor.</description>

<class fullname="tinymce.AddOnManager" name="AddOnManager" summary="This class handles the loading of themes/plugins or other add-ons and their language packs.">

<description>This class handles the loading of themes/plugins or other add-ons and their language packs.

</description>

<members>

<event name="onAdd" summary="Fires when a item is added.">

<description>Fires when a item is added.

</description>

</event>

<method name="get" summary="Returns the specified add on by the short name.">

<description>Returns the specified add on by the short name.

</description>

<param name="n" type="String">

<description>Add-on to look for.</description>

</param>

<return>

<type fullname="tinymce.Theme"/>

<type fullname="tinymce.Plugin"/>

<description>Theme or plugin add-on instance or undefined.</description>

</return>

</method>

<method name="requireLangPack" summary="Loads a language pack for the specified add-on.">

<description>Loads a language pack for the specified add-on.

</description>

<param name="n" type="String">

<description>Short name of the add-on.</description>

</param>

</method>

<method name="add" summary="Adds a instance of the add-on by it's short name.">

<description>Adds a instance of the add-on by it's short name.

</description>

<param name="id" type="String">

<description>Short name/id for the add-on.</description>

</param>

<param name="o">

<type fullname="tinymce.Theme"/>

<type fullname="tinymce.Plugin"/>

<description>Theme or plugin to add.</description>

</param>

<return>

<type fullname="tinymce.Theme"/>

<type fullname="tinymce.Plugin"/>

<description>The same theme or plugin instance that got passed in.</description>

</return>

<example>// Create a simple plugin

tinymce.create('tinymce.plugins.TestPlugin', {

    TestPlugin : function(ed, url) {

        ed.onClick.add(function(ed, e) {

            ed.windowManager.alert('Hello World!');

        });

    }

});



// Register plugin using the add method

tinymce.PluginManager.add('test', tinymce.plugins.TestPlugin);



// Initialize TinyMCE

tinyMCE.init({

   ...

   plugins : '-test' // Init the plugin but don't try to load it

});</example>

</method>

<method name="load" summary="Loads an add-on from a specific url.">

<description>Loads an add-on from a specific url.

</description>

<param name="n" type="String">

<description>Short name of the add-on that gets loaded.</description>

</param>

<param name="u" type="String">

<description>URL to the add-on that will get loaded.</description>

</param>

<param name="cb" type="function">

<description>Optional callback to execute ones the add-on is loaded.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the callback in.</description>

</param>

<example>// Loads a plugin from an external URL

tinymce.PluginManager.load('myplugin', '/some/dir/someplugin/editor_plugin.js');



// Initialize TinyMCE

tinyMCE.init({

   ...

   plugins : '-myplugin' // Don't try to load it again

});</example>

</method>

</members>

</class>

<class fullname="tinymce.Theme" name="Theme" summary="TinyMCE theme class.">

<description>TinyMCE theme class.

</description>

<members>

<method name="init" summary="Initializes the theme.">

<description>Initializes the theme.

</description>

<param name="editor" type="tinymce.Editor">

<description>Editor instance that created the theme instance.</description>

</param>

<param name="url" type="String">

<description>Absolute URL where the theme is located.</description>

</param>

</method>

<method name="getInfo" summary="Meta info method, this method gets executed when TinyMCE wants to present information about the theme for example in the...">

<description>Meta info method, this method gets executed when TinyMCE wants to present information about the theme for example in the about/help dialog.

</description>

<return type="Object">

<description>Returns an object with meta information about the theme the current items are longname, author, authorurl, infourl and version.</description>

</return>

</method>

<method name="renderUI" summary="This method is responsible for rendering/generating the overall user interface with toolbars, buttons, iframe containers...">

<description>This method is responsible for rendering/generating the overall user interface with toolbars, buttons, iframe containers etc.

</description>

<param name="obj" type="Object">

<description>Object parameter containing the targetNode DOM node that will be replaced visually with an editor instance.</description>

</param>

<return type="Object">

<description>an object with items like iframeContainer, editorContainer, sizeContainer, deltaWidth, deltaHeight.</description>

</return>

</method>

</members>

</class>

<class fullname="tinymce.Plugin" name="Plugin" summary="Plugin base class, this is a pseudo class that describes how a plugin is to be created for TinyMCE.">

<description>Plugin base class, this is a pseudo class that describes how a plugin is to be created for TinyMCE. The methods below are all optional.

</description>

<example>// Create a new plugin class

tinymce.create('tinymce.plugins.ExamplePlugin', {

    init : function(ed, url) {

        // Register an example button

        ed.addButton('example', {

            title : 'example.desc',

            onclick : function() {

                 // Display an alert when the user clicks the button

                 ed.windowManager.alert('Hello world!');

            },

            'class' : 'bold' // Use the bold icon from the theme

        });

    }

});



// Register plugin with a short name

tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);



// Initialize TinyMCE with the new plugin and button

tinyMCE.init({

   ...

   plugins : '-example', // - means TinyMCE will not try to load it

   theme_advanced_buttons1 : 'example' // Add the new example button to the toolbar

});</example>

<members>

<method name="init" summary="Initialization function for the plugin.">

<description>Initialization function for the plugin. This will be called when the plugin is created.

</description>

<param name="editor" type="tinymce.Editor">

<description>Editor instance that created the plugin instance.</description>

</param>

<param name="url" type="String">

<description>Absolute URL where the plugin is located.</description>

</param>

<example>// Creates a new plugin class

tinymce.create('tinymce.plugins.ExamplePlugin', {

    init : function(ed, url) {

        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');

        ed.addCommand('mceExample', function() {

            ed.windowManager.open({

                file : url + '/dialog.htm',

                width : 320 + ed.getLang('example.delta_width', 0),

                height : 120 + ed.getLang('example.delta_height', 0),

                inline : 1

            }, {

                plugin_url : url, // Plugin absolute URL

                some_custom_arg : 'custom arg' // Custom argument

            });

        });



        // Register example button

        ed.addButton('example', {

            title : 'example.desc',

            cmd : 'mceExample',

            image : url + '/img/example.gif'

        });



        // Add a node change handler, selects the button in the UI when a image is selected

        ed.onNodeChange.add(function(ed, cm, n) {

            cm.setActive('example', n.nodeName == 'IMG');

        });

    }

});



// Register plugin

tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);</example>

</method>

<method name="getInfo" summary="Meta info method, this method gets executed when TinyMCE wants to present information about the plugin for example in th...">

<description>Meta info method, this method gets executed when TinyMCE wants to present information about the plugin for example in the about/help dialog.

</description>

<return type="Object">

<description>Returns an object with meta information about the plugin the current items are longname, author, authorurl, infourl and version.</description>

</return>

<example>// Creates a new plugin class

tinymce.create('tinymce.plugins.ExamplePlugin', {

    // Meta info method

    getInfo : function() {

        return {

            longname : 'Example plugin',

            author : 'Some author',

            authorurl : 'http://tinymce.moxiecode.com',

            infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',

            version : "1.0"

        };

    }

});



// Register plugin

tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);



// Initialize TinyMCE with the new plugin

tinyMCE.init({

   ...

   plugins : '-example' // - means TinyMCE will not try to load it

});</example>

</method>

<method name="createControl" summary="Gets called when a new control instance is created.">

<description>Gets called when a new control instance is created.

</description>

<param name="name" type="String">

<description>Control name to create for example "mylistbox"</description>

</param>

<param name="controlman" type="tinymce.ControlManager">

<description>Control manager/factory to use to create the control.</description>

</param>

<return type="tinymce.ui.Control">

<description>Returns a new control instance or null.</description>

</return>

<example>// Creates a new plugin class

tinymce.create('tinymce.plugins.ExamplePlugin', {

    createControl: function(n, cm) {

        switch (n) {

            case 'mylistbox':

                var mlb = cm.createListBox('mylistbox', {

                     title : 'My list box',

                     onselect : function(v) {

                         tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);

                     }

                });



                // Add some values to the list box

                mlb.add('Some item 1', 'val1');

                mlb.add('some item 2', 'val2');

                mlb.add('some item 3', 'val3');



                // Return the new listbox instance

                return mlb;

        }



        return null;

    }

});



// Register plugin

tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);



// Initialize TinyMCE with the new plugin and button

tinyMCE.init({

   ...

   plugins : '-example', // - means TinyMCE will not try to load it

   theme_advanced_buttons1 : 'mylistbox' // Add the new mylistbox control to the toolbar

});</example>

</method>

</members>

</class>

<class fullname="tinymce.ControlManager" name="ControlManager" summary="This class is responsible for managing UI control instances.">

<description>This class is responsible for managing UI control instances. It's both a factory and a collection for the controls.</description>

<members>

<method constructor="true" name="ControlManager" summary="Constructs a new control manager instance.">

<description>Constructs a new control manager instance.

Consult the Wiki for more details on this class.

</description>

<param name="ed" type="tinymce.Editor">

<description>TinyMCE editor instance to add the control to.</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control manager.</description>

</param>

</method>

<method name="get" summary="Returns a control by id or undefined it it wasn't found.">

<description>Returns a control by id or undefined it it wasn't found.

</description>

<param name="id" type="String">

<description>Control instance name.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance or undefined.</description>

</return>

</method>

<method name="setActive" summary="Sets the active state of a control by id.">

<description>Sets the active state of a control by id.

</description>

<param name="id" type="String">

<description>Control id to set state on.</description>

</param>

<param name="s" type="Boolean">

<description>Active state true/false.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got activated or null if it wasn't found.</description>

</return>

</method>

<method name="setDisabled" summary="Sets the dsiabled state of a control by id.">

<description>Sets the dsiabled state of a control by id.

</description>

<param name="id" type="String">

<description>Control id to set state on.</description>

</param>

<param name="s" type="Boolean">

<description>Active state true/false.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got disabled or null if it wasn't found.</description>

</return>

</method>

<method name="add" summary="Adds a control to the control collection inside the manager.">

<description>Adds a control to the control collection inside the manager.

</description>

<param name="Control" type="tinymce.ui.Control">

<description>instance to add to collection.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got passed in.</description>

</return>

</method>

<method name="createControl" summary="Creates a control by name, when a control is created it will automatically add it to the control collection.">

<description>Creates a control by name, when a control is created it will automatically add it to the control collection.

It first ask all plugins for the specified control if the plugins didn't return a control then the default behavior

will be used.

</description>

<param name="n" type="String">

<description>Control name to create for example "separator".</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createDropMenu" summary="Creates a drop menu control instance by id.">

<description>Creates a drop menu control instance by id.

</description>

<param name="id" type="String">

<description>Unique id for the new dropdown instance. For example "some menu".</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control.</description>

</param>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createListBox" summary="Creates a list box control instance by id.">

<description>Creates a list box control instance by id. A list box is either a native select element or a DOM/JS based list box control. This

depends on the use_native_selects settings state.

</description>

<param name="id" type="String">

<description>Unique id for the new listbox instance. For example "styles".</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control.</description>

</param>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createButton" summary="Creates a button control instance by id.">

<description>Creates a button control instance by id.

</description>

<param name="id" type="String">

<description>Unique id for the new button instance. For example "bold".</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control.</description>

</param>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createMenuButton" summary="Creates a menu button control instance by id.">

<description>Creates a menu button control instance by id.

</description>

<param name="id" type="String">

<description>Unique id for the new menu button instance. For example "menu1".</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control.</description>

</param>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createSplitButton" summary="Creates a split button control instance by id.">

<description>Creates a split button control instance by id.

</description>

<param name="id" type="String">

<description>Unique id for the new split button instance. For example "spellchecker".</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control.</description>

</param>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createColorSplitButton" summary="Creates a color split button control instance by id.">

<description>Creates a color split button control instance by id.

</description>

<param name="id" type="String">

<description>Unique id for the new color split button instance. For example "forecolor".</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control.</description>

</param>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createToolbar" summary="Creates a toolbar container control instance by id.">

<description>Creates a toolbar container control instance by id.

</description>

<param name="id" type="String">

<description>Unique id for the new toolbar container control instance. For example "toolbar1".</description>

</param>

<param name="s" type="Object">

<description>Optional settings object for the control.</description>

</param>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="createSeparator" summary="Creates a separator control instance.">

<description>Creates a separator control instance.

</description>

<param name="cc" type="Object">

<description>Optional control class to use instead of the default one.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance that got created and added.</description>

</return>

</method>

<method name="setControlType" summary="Overrides a specific control type with a custom class.">

<description>Overrides a specific control type with a custom class.

</description>

<param name="n" type="string">

<description>Name of the control to override for example button or dropmenu.</description>

</param>

<param name="c" type="function">

<description>Class reference to use instead of the default one.</description>

</param>

<return type="function">

<description>Same as the class reference.</description>

</return>

</method>

<method name="destroy" summary="Destroy.">

<description>Destroy.

</description>

</method>

</members>

</class>

<class fullname="tinymce.Editor" name="Editor" summary="This class contains the core logic for a TinyMCE editor.">

<description>This class contains the core logic for a TinyMCE editor.

</description>

<example>// Add a class to all paragraphs in the editor.

tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass');



// Gets the current editors selection as text

tinyMCE.activeEditor.selection.getContent({format : 'text'});



// Creates a new editor instance

var ed = new tinymce.Editor('textareaid', {

    some_setting : 1

});



// Select each item the user clicks on

ed.onClick.add(function(ed, e) {

    ed.selection.select(e.target);

});



ed.render();</example>

<members>

<method author="Moxiecode" constructor="true" name="Editor" summary="Constructs a editor instance by id.">

<description>Constructs a editor instance by id.

</description>

<param name="id" type="String">

<description>Unique id for the editor.</description>

</param>

<param name="s" type="Object">

<description>Optional settings string for the editor.</description>

</param>

</method>

<property name="id" summary="Editor instance id, normally the same as the div/textarea that was replaced." type="String">

<description>Editor instance id, normally the same as the div/textarea that was replaced.

</description>

</property>

<property name="isNotDirty" summary="State to force the editor to return false on a isDirty call." type="Boolean">

<description>State to force the editor to return false on a isDirty call.

</description>

<example>function ajaxSave() {

    var ed = tinyMCE.get('elm1');



    // Save contents using some XHR call

    alert(ed.getContent());



    ed.isNotDirty = 1; // Force not dirty state

}</example>

</property>

<property name="plugins" summary="Name/Value object containting plugin instances." type="Object">

<description>Name/Value object containting plugin instances.

</description>

<example>// Execute a method inside a plugin directly

tinyMCE.activeEditor.plugins.someplugin.someMethod();</example>

</property>

<event name="onPreInit" summary="Fires before the initialization of the editor.">

<description>Fires before the initialization of the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onPreInit event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onPreInit.add(function(ed) {

          console.debug('PreInit: ' + ed.id);

      });

   }

});</example>

<see member="onInit"/>

</event>

<event name="onBeforeRenderUI" summary="Fires before the initialization of the editor.">

<description>Fires before the initialization of the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onBeforeRenderUI event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

     ed.onBeforeRenderUI.add(function(ed, cm) {

         console.debug('Before render: ' + ed.id);

     });

   }

});</example>

</event>

<event name="onPostRender" summary="Fires after the rendering has completed.">

<description>Fires after the rendering has completed.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onPostRender event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onPostRender.add(function(ed, cm) {

          console.debug('After render: ' + ed.id);

      });

   }

});</example>

</event>

<event name="onInit" summary="Fires after the initialization of the editor is done.">

<description>Fires after the initialization of the editor is done.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onInit event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onInit.add(function(ed) {

          console.debug('Editor is done: ' + ed.id);

      });

   }

});</example>

<see member="onPreInit"/>

</event>

<event name="onRemove" summary="Fires when the editor instance is removed from page.">

<description>Fires when the editor instance is removed from page.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onRemove event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onRemove.add(function(ed) {

          console.debug('Editor was removed: ' + ed.id);

      });

   }

});</example>

</event>

<event name="onActivate" summary="Fires when the editor is activated.">

<description>Fires when the editor is activated.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onActivate event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onActivate.add(function(ed) {

          console.debug('Editor was activated: ' + ed.id);

      });

   }

});</example>

</event>

<event name="onDeactivate" summary="Fires when the editor is deactivated.">

<description>Fires when the editor is deactivated.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onDeactivate event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onDeactivate.add(function(ed) {

          console.debug('Editor was deactivated: ' + ed.id);

      });

   }

});</example>

</event>

<event name="onClick" summary="Fires when something in the body of the editor is clicked.">

<description>Fires when something in the body of the editor is clicked.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onClick event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onClick.add(function(ed, e) {

          console.debug('Editor was clicked: ' + e.target.nodeName);

      });

   }

});</example>

</event>

<event name="onEvent" summary="Fires when a registered event is intercepted.">

<description>Fires when a registered event is intercepted.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onEvent event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onEvent.add(function(ed, e) {

         console.debug('Editor event occured: ' + e.target.nodeName);

      });

   }

});</example>

</event>

<event name="onMouseUp" summary="Fires when a mouseup event is intercepted inside the editor.">

<description>Fires when a mouseup event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onMouseUp event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onMouseUp.add(function(ed, e) {

          console.debug('Mouse up event: ' + e.target.nodeName);

      });

   }

});</example>

</event>

<event name="onMouseDown" summary="Fires when a mousedown event is intercepted inside the editor.">

<description>Fires when a mousedown event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onMouseDown event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onMouseDown.add(function(ed, e) {

          console.debug('Mouse down event: ' + e.target.nodeName);

      });

   }

});</example>

</event>

<event name="onDblClick" summary="Fires when a dblclick event is intercepted inside the editor.">

<description>Fires when a dblclick event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onDblClick event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onDblClick.add(function(ed, e) {

         console.debug('Double click event: ' + e.target.nodeName);

      });

   }

});</example>

</event>

<event name="onKeyDown" summary="Fires when a keydown event is intercepted inside the editor.">

<description>Fires when a keydown event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onKeyDown event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onKeyDown.add(function(ed, e) {

          console.debug('Key down event: ' + e.keyCode);

      });

   }

});</example>

</event>

<event name="onKeyUp" summary="Fires when a keydown event is intercepted inside the editor.">

<description>Fires when a keydown event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onKeyUp event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onKeyUp.add(function(ed, e) {

          console.debug('Key up event: ' + e.keyCode);

      });

   }

});</example>

</event>

<event name="onKeyPress" summary="Fires when a keypress event is intercepted inside the editor.">

<description>Fires when a keypress event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onKeyPress event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onKeyPress.add(function(ed, e) {

          console.debug('Key press event: ' + e.keyCode);

      });

   }

});</example>

</event>

<event name="onContextMenu" summary="Fires when a contextmenu event is intercepted inside the editor.">

<description>Fires when a contextmenu event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onContextMenu event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onContextMenu.add(function(ed, e) {

           console.debug('Context menu event:' + e.target);

      });

   }

});</example>

</event>

<event name="onSubmit" summary="Fires when a form submit event is intercepted.">

<description>Fires when a form submit event is intercepted.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onSubmit event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onSubmit.add(function(ed, e) {

           console.debug('Form submit:' + e.target);

      });

   }

});</example>

</event>

<event name="onReset" summary="Fires when a form reset event is intercepted.">

<description>Fires when a form reset event is intercepted.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onReset event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onReset.add(function(ed, e) {

           console.debug('Form reset:' + e.target);

      });

   }

});</example>

</event>

<event name="onPaste" summary="Fires when a paste event is intercepted inside the editor.">

<description>Fires when a paste event is intercepted inside the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onPaste event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onPaste.add(function(ed, e) {

           console.debug('Pasted plain text');

      });

   }

});</example>

</event>

<event name="onPreProcess" summary="Fires when the Serializer does a preProcess on the contents.">

<description>Fires when the Serializer does a preProcess on the contents.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="obj" type="Object">

<description>PreProcess object.</description>

<option name="node" type="Node">

<description>DOM node for the item being serialized.</description>

</option>

<option name="format" type="String">

<description>The specified output format normally "html".</description>

</option>

<option name="get" type="Boolean">

<description>Is true if the process is on a getContent operation.</description>

</option>

<option name="set" type="Boolean">

<description>Is true if the process is on a setContent operation.</description>

</option>

<option name="cleanup" type="Boolean">

<description>Is true if the process is on a cleanup operation.</description>

</option>

</param>

<example>// Adds an observer to the onPreProcess event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onPreProcess.add(function(ed, o) {

           // Add a class to each paragraph in the editor

           ed.dom.addClass(ed.dom.select('p', o.node), 'myclass');

      });

   }

});</example>

</event>

<event name="onPostProcess" summary="Fires when the Serializer does a postProcess on the contents.">

<description>Fires when the Serializer does a postProcess on the contents.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="obj" type="Object">

<description>PreProcess object.</description>

</param>

<example>// Adds an observer to the onPostProcess event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onPostProcess.add(function(ed, o) {

           // Remove all paragraphs and replace with BR

           o.content = o.content.replace(/&lt;p[^&gt;]+&gt;|&lt;p&gt;/g, '');

           o.content = o.content.replace(/&lt;\/p&gt;/g, '&lt;br /&gt;');

      });

   }

});</example>

</event>

<event name="onBeforeSetContent" summary="Fires before new contents is added to the editor.">

<description>Fires before new contents is added to the editor. Using for example setContent.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onBeforeSetContent event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onBeforeSetContent.add(function(ed, o) {

           // Replaces all a characters with b characters

           o.content = o.content.replace(/a/g, 'b');

      });

   }

});</example>

</event>

<event name="onBeforeGetContent" summary="Fires before contents is extracted from the editor using for example getContent.">

<description>Fires before contents is extracted from the editor using for example getContent.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="evt" type="Event">

<description>W3C DOM Event instance.</description>

</param>

<example>// Adds an observer to the onBeforeGetContent event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onBeforeGetContent.add(function(ed, o) {

           console.debug('Before get content.');

      });

   }

});</example>

</event>

<event name="onSetContent" summary="Fires after the contents has been added to the editor using for example onSetContent.">

<description>Fires after the contents has been added to the editor using for example onSetContent.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onSetContent event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onSetContent.add(function(ed, o) {

           // Replaces all a characters with b characters

           o.content = o.content.replace(/a/g, 'b');

      });

   }

});</example>

</event>

<event name="onGetContent" summary="Fires after the contents has been extracted from the editor using for example getContent.">

<description>Fires after the contents has been extracted from the editor using for example getContent.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onGetContent event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onGetContent.add(function(ed, o) {

          // Replace all a characters with b

          o.content = o.content.replace(/a/g, 'b');

      });

   }

});</example>

</event>

<event name="onLoadContent" summary="Fires when the editor gets loaded with contents for example when the load method is executed.">

<description>Fires when the editor gets loaded with contents for example when the load method is executed.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onLoadContent event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onLoadContent.add(function(ed, o) {

          // Output the element name

          console.debug(o.element.nodeName);

      });

   }

});</example>

</event>

<event name="onSaveContent" summary="Fires when the editor contents gets saved for example when the save method is executed.">

<description>Fires when the editor contents gets saved for example when the save method is executed.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onSaveContent event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onSaveContent.add(function(ed, o) {

          // Output the element name

          console.debug(o.element.nodeName);

      });

   }

});</example>

</event>

<event name="onNodeChange" summary="Fires when the user changes node location using the mouse or keyboard.">

<description>Fires when the user changes node location using the mouse or keyboard.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onNodeChange event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onNodeChange.add(function(ed, cm, e) {

          // Activates the link button when the caret is placed in a anchor element

          if (e.nodeName == 'A')

             cm.setActive('link', true);

      });

   }

});</example>

</event>

<event name="onChange" summary="Fires when a new undo level is added to the editor.">

<description>Fires when a new undo level is added to the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onChange event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

	  ed.onChange.add(function(ed, l) {

		  console.debug('Editor contents was modified. Contents: ' + l.content);

	  });

   }

});</example>

</event>

<event name="onBeforeExecCommand" summary="Fires before a command gets executed for example &quot;Bold&quot;.">

<description>Fires before a command gets executed for example "Bold".

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onBeforeExecCommand event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {

          console.debug('Command is to be executed: ' + cmd);

      });

   }

});</example>

</event>

<event name="onExecCommand" summary="Fires after a command is executed for example &quot;Bold&quot;.">

<description>Fires after a command is executed for example "Bold".

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onExecCommand event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onExecCommand.add(function(ed, cmd, ui, val) {

          console.debug('Command was executed: ' + cmd);

      });

   }

});</example>

</event>

<event name="onUndo" summary="Fires when the contents is undo:ed.">

<description>Fires when the contents is undo:ed.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="level" type="Object">

<description>{Object} level Undo level object.

@ example

// Adds an observer to the onUndo event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onUndo.add(function(ed, level) {

          console.debug('Undo was performed: ' + level.content);

      });

   }

});</description>

</param>

</event>

<event name="onRedo" summary="Fires when the contents is redo:ed.">

<description>Fires when the contents is redo:ed.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="level" type="Object">

<description>Undo level object.</description>

</param>

<example>// Adds an observer to the onRedo event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onRedo.add(function(ed, level) {

          console.debug('Redo was performed: ' +level.content);

      });

   }

});</example>

</event>

<event name="onVisualAid" summary="Fires when visual aids is enabled/disabled.">

<description>Fires when visual aids is enabled/disabled.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onVisualAid event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onVisualAid.add(function(ed, e, s) {

          console.debug('onVisualAid event: ' + ed.id + ", State: " + s);

      });

   }

});</example>

</event>

<event name="onSetProgressState" summary="Fires when the progress throbber is shown above the editor.">

<description>Fires when the progress throbber is shown above the editor.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Adds an observer to the onSetProgressState event using tinyMCE.init

tinyMCE.init({

   ...

   setup : function(ed) {

      ed.onSetProgressState.add(function(ed, b) {

           if (b)

                console.debug('SHOW!');

           else

                console.debug('HIDE!');

      });

   }

});</example>

</event>

<property name="settings" summary="Name/value collection with editor settings." type="Object">

<description>Name/value collection with editor settings.

</description>

<example>// Get the value of the theme setting

tinyMCE.activeEditor.windowManager.alert("You are using the " + tinyMCE.activeEditor.settings.theme + " theme");</example>

</property>

<property name="documentBaseURI" summary="URI object to document configured for the TinyMCE instance." type="tinymce.util.URI">

<description>URI object to document configured for the TinyMCE instance.

</description>

<example>// Get relative URL from the location of document_base_url

tinyMCE.activeEditor.documentBaseURI.toRelative('/somedir/somefile.htm');



// Get absolute URL from the location of document_base_url

tinyMCE.activeEditor.documentBaseURI.toAbsolute('somefile.htm');</example>

</property>

<property name="baseURI" summary="URI object to current document that holds the TinyMCE editor instance." type="tinymce.util.URI">

<description>URI object to current document that holds the TinyMCE editor instance.

</description>

<example>// Get relative URL from the location of the API

tinyMCE.activeEditor.baseURI.toRelative('/somedir/somefile.htm');



// Get absolute URL from the location of the API

tinyMCE.activeEditor.baseURI.toAbsolute('somefile.htm');</example>

</property>

<property name="contentCSS" summary="Array with CSS files to load into the iframe." type="Array">

<description>Array with CSS files to load into the iframe.

</description>

</property>

<method name="render" summary="Renderes the editor/adds it to the page.">

<description>Renderes the editor/adds it to the page.

</description>

</method>

<property name="windowManager" summary="Window manager reference, use this to open new windows and dialogs." type="tinymce.WindowManager">

<description>Window manager reference, use this to open new windows and dialogs.

</description>

<example>// Shows an alert message

tinyMCE.activeEditor.windowManager.alert('Hello world!');



// Opens a new dialog with the file.htm file and the size 320x240

// It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.

tinyMCE.activeEditor.windowManager.open({

   url : 'file.htm',

   width : 320,

   height : 240

}, {

   custom_param : 1

});</example>

</property>

<method name="init" summary="Initializes the editor this will be called automatically when all plugins/themes and language packs are loaded by the re...">

<description>Initializes the editor this will be called automatically when

all plugins/themes and language packs are loaded by the rendered method.

This method will setup the iframe and create the theme and plugin instances.

</description>

</method>

<property name="theme" summary="Reference to the theme instance that was used to generate the UI." type="tinymce.Theme">

<description>Reference to the theme instance that was used to generate the UI.

</description>

<example>// Executes a method on the theme directly

tinyMCE.activeEditor.theme.someMethod();</example>

</property>

<property name="controlManager" summary="Control manager instance for the editor." type="tinymce.ControlManager">

<description>Control manager instance for the editor. Will enables you to create new UI elements and change their states etc.

</description>

<example>// Disables the bold button

tinyMCE.activeEditor.controlManager.setDisabled('bold', true);</example>

</property>

<method name="setupIframe" summary="This method get called by the init method ones the iframe is loaded.">

<description>This method get called by the init method ones the iframe is loaded.

It will fill the iframe with contents, setups DOM and selection objects for the iframe.

This method should not be called directly.

</description>

</method>

<property name="schema" summary="Schema instance, enables you to validate elements and it's children." type="tinymce.html.Schema">

<description>Schema instance, enables you to validate elements and it's children.

</description>

</property>

<property name="dom" summary="DOM instance for the editor." type="tinymce.dom.DOMUtils">

<description>DOM instance for the editor.

</description>

<example>// Adds a class to all paragraphs within the editor

tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass');</example>

</property>

<property name="parser" summary="HTML parser will be used when contents is inserted into the editor." type="tinymce.html.DomParser">

<description>HTML parser will be used when contents is inserted into the editor.

</description>

</property>

<property name="serializer" summary="DOM serializer for the editor." type="tinymce.dom.Serializer">

<description>DOM serializer for the editor. Will be used when contents is extracted from the editor.

</description>

<example>// Serializes the first paragraph in the editor into a string

tinyMCE.activeEditor.serializer.serialize(tinyMCE.activeEditor.dom.select('p')[0]);</example>

</property>

<property name="selection" summary="Selection instance for the editor." type="tinymce.dom.Selection">

<description>Selection instance for the editor.

</description>

<example>// Sets some contents to the current selection in the editor

tinyMCE.activeEditor.selection.setContent('Some contents');



// Gets the current selection

alert(tinyMCE.activeEditor.selection.getContent());



// Selects the first paragraph found

tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]);</example>

</property>

<property name="formatter" summary="Formatter instance." type="tinymce.Formatter">

<description>Formatter instance.

</description>

</property>

<property name="undoManager" summary="Undo manager instance, responsible for handling undo levels." type="tinymce.UndoManager">

<description>Undo manager instance, responsible for handling undo levels.

</description>

<example>// Undoes the last modification to the editor

tinyMCE.activeEditor.undoManager.undo();</example>

</property>

<method name="setupContentEditable" summary="Sets up the contentEditable mode.">

<description>Sets up the contentEditable mode.

</description>

</method>

<method name="focus" summary="Focuses/activates the editor.">

<description>Focuses/activates the editor. This will set this editor as the activeEditor in the tinymce collection

it will also place DOM focus inside the editor.

</description>

<param name="sf" type="Boolean">

<description>Skip DOM focus. Just set is as the active editor.</description>

</param>

</method>

<method name="execCallback" summary="Executes a legacy callback.">

<description>Executes a legacy callback. This method is useful to call old 2.x option callbacks.

There new event model is a better way to add callback so this method might be removed in the future.

</description>

<param name="n" type="String">

<description>Name of the callback to execute.</description>

</param>

<return type="Object">

<description>Return value passed from callback function.</description>

</return>

</method>

<method name="translate" summary="Translates the specified string by replacing variables with language pack items it will also check if there is a key mat...">

<description>Translates the specified string by replacing variables with language pack items it will also check if there is

a key mathcin the input.

</description>

<param name="s" type="String">

<description>String to translate by the language pack data.</description>

</param>

<return type="String">

<description>Translated string.</description>

</return>

</method>

<method name="getLang" summary="Returns a language pack item by name/key.">

<description>Returns a language pack item by name/key.

</description>

<param name="n" type="String">

<description>Name/key to get from the language pack.</description>

</param>

<param name="dv" type="String">

<description>Optional default value to retrive.</description>

</param>

</method>

<method name="getParam" summary="Returns a configuration parameter by name.">

<description>Returns a configuration parameter by name.

</description>

<param name="n" type="String">

<description>Configruation parameter to retrive.</description>

</param>

<param name="dv" type="String">

<description>Optional default value to return.</description>

</param>

<param name="ty" type="String">

<description>Optional type parameter.</description>

</param>

<return type="String">

<description>Configuration parameter value or default value.</description>

</return>

<example>// Returns a specific config value from the currently active editor

var someval = tinyMCE.activeEditor.getParam('myvalue');



// Returns a specific config value from a specific editor instance by id

var someval2 = tinyMCE.get('my_editor').getParam('myvalue');</example>

</method>

<method name="nodeChanged" summary="Distpaches out a onNodeChange event to all observers.">

<description>Distpaches out a onNodeChange event to all observers. This method should be called when you

need to update the UI states or element path etc.

</description>

<param name="o" type="Object">

<description>Optional object to pass along for the node changed event.</description>

</param>

</method>

<method name="addButton" summary="Adds a button that later gets created by the ControlManager.">

<description>Adds a button that later gets created by the ControlManager. This is a shorter and easier method

of adding buttons without the need to deal with the ControlManager directly. But it's also less

powerfull if you need more control use the ControlManagers factory methods instead.

</description>

<param name="n" type="String">

<description>Button name to add.</description>

</param>

<param name="s" type="Object">

<description>Settings object with title, cmd etc.</description>

</param>

<example>// Adds a custom button to the editor and when a user clicks the button it will open

// an alert box with the selected contents as plain text.

tinyMCE.init({

   ...



   theme_advanced_buttons1 : 'example,..'



   setup : function(ed) {

      // Register example button

      ed.addButton('example', {

         title : 'example.desc',

         image : '../jscripts/tiny_mce/plugins/example/img/example.gif',

         onclick : function() {

            ed.windowManager.alert('Hello world!! Selection: ' + ed.selection.getContent({format : 'text'}));

         }

      });

   }

});</example>

</method>

<method name="addCommand" summary="Adds a custom command to the editor, you can also override existing commands with this method.">

<description>Adds a custom command to the editor, you can also override existing commands with this method.

The command that you add can be executed with execCommand.

</description>

<param name="name" type="String">

<description>Command name to add/override.</description>

</param>

<param name="callback" type="tinymce.Editor.addCommandCallback">

<description>Function to execute when the command occurs.</description>

</param>

<param name="scope" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

<example>// Adds a custom command that later can be executed using execCommand

tinyMCE.init({

   ...



   setup : function(ed) {

      // Register example command

      ed.addCommand('mycommand', function(ui, v) {

         ed.windowManager.alert('Hello world!! Selection: ' + ed.selection.getContent({format : 'text'}));

      });

   }

});</example>

</method>

<callback fullname="tinymce.Editor.addCommandCallback" name="addCommandCallback" summary="Callback function that gets called when a command is executed.">

<description>Callback function that gets called when a command is executed.

</description>

<param name="ui" type="Boolean">

<description>Display UI state true/false.</description>

</param>

<param name="value" type="Object">

<description>Optional value for command.</description>

</param>

<return type="Boolean">

<description>True/false state if the command was handled or not.</description>

</return>

</callback>

<method name="addQueryStateHandler" summary="Adds a custom query state command to the editor, you can also override existing commands with this method.">

<description>Adds a custom query state command to the editor, you can also override existing commands with this method.

The command that you add can be executed with queryCommandState function.

</description>

<param name="name" type="String">

<description>Command name to add/override.</description>

</param>

<param name="callback" type="tinymce.Editor.addQueryStateHandlerCallback">

<description>Function to execute when the command state retrival occurs.</description>

</param>

<param name="scope" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

</method>

<callback fullname="tinymce.Editor.addQueryStateHandlerCallback" name="addQueryStateHandlerCallback" summary="Callback function that gets called when a queryCommandState is executed.">

<description>Callback function that gets called when a queryCommandState is executed.

</description>

<return type="Boolean">

<description>True/false state if the command is enabled or not like is it bold.</description>

</return>

</callback>

<method name="addQueryValueHandler" summary="Adds a custom query value command to the editor, you can also override existing commands with this method.">

<description>Adds a custom query value command to the editor, you can also override existing commands with this method.

The command that you add can be executed with queryCommandValue function.

</description>

<param name="name" type="String">

<description>Command name to add/override.</description>

</param>

<param name="callback" type="tinymce.Editor.addQueryValueHandlerCallback">

<description>Function to execute when the command value retrival occurs.</description>

</param>

<param name="scope" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

</method>

<callback fullname="tinymce.Editor.addQueryValueHandlerCallback" name="addQueryValueHandlerCallback" summary="Callback function that gets called when a queryCommandValue is executed.">

<description>Callback function that gets called when a queryCommandValue is executed.

</description>

<return type="Object">

<description>Value of the command or undefined.</description>

</return>

</callback>

<method name="addShortcut" summary="Adds a keyboard shortcut for some command or function.">

<description>Adds a keyboard shortcut for some command or function.

</description>

<param name="pa" type="String">

<description>Shortcut pattern. Like for example: ctrl+alt+o.</description>

</param>

<param name="desc" type="String">

<description>Text description for the command.</description>

</param>

<param name="cmd_func">

<type fullname="String"/>

<type fullname="Function"/>

<description>Command name string or function to execute when the key is pressed.</description>

</param>

<param name="sc" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

<return type="Boolean">

<description>true/false state if the shortcut was added or not.</description>

</return>

</method>

<method name="execCommand" summary="Executes a command on the current instance.">

<description>Executes a command on the current instance. These commands can be TinyMCE internal commands prefixed with "mce" or

they can be build in browser commands such as "Bold". A compleate list of browser commands is available on MSDN or Mozilla.org.

This function will dispatch the execCommand function on each plugin, theme or the execcommand_callback option if none of these

return true it will handle the command as a internal browser command.

</description>

<param name="cmd" type="String">

<description>Command name to execute, for example mceLink or Bold.</description>

</param>

<param name="ui" type="Boolean">

<description>True/false state if a UI (dialog) should be presented or not.</description>

</param>

<param name="val" type="mixed">

<description>Optional command value, this can be anything.</description>

</param>

<param name="a" type="Object">

<description>Optional arguments object.</description>

</param>

<return type="Boolean">

<description>True/false if the command was executed or not.</description>

</return>

</method>

<method name="queryCommandState" summary="Returns a command specific state, for example if bold is enabled or not.">

<description>Returns a command specific state, for example if bold is enabled or not.

</description>

<param name="cmd" type="string">

<description>Command to query state from.</description>

</param>

<return type="Boolean">

<description>Command specific state, for example if bold is enabled or not.</description>

</return>

</method>

<method name="queryCommandValue" summary="Returns a command specific value, for example the current font size.">

<description>Returns a command specific value, for example the current font size.

</description>

<param name="c" type="string">

<description>Command to query value from.</description>

</param>

<return type="Object">

<description>Command specific value, for example the current font size.</description>

</return>

</method>

<method name="show" summary="Shows the editor and hides any textarea/div that the editor is supposed to replace.">

<description>Shows the editor and hides any textarea/div that the editor is supposed to replace.

</description>

</method>

<method name="hide" summary="Hides the editor and shows any textarea/div that the editor is supposed to replace.">

<description>Hides the editor and shows any textarea/div that the editor is supposed to replace.

</description>

</method>

<method name="isHidden" summary="Returns true/false if the editor is hidden or not.">

<description>Returns true/false if the editor is hidden or not.

</description>

<return type="Boolean">

<description>True/false if the editor is hidden or not.</description>

</return>

</method>

<method name="setProgressState" summary="Sets the progress state, this will display a throbber/progess for the editor.">

<description>Sets the progress state, this will display a throbber/progess for the editor.

This is ideal for asycronous operations like an AJAX save call.

</description>

<param name="b" type="Boolean">

<description>Boolean state if the progress should be shown or hidden.</description>

</param>

<param name="ti" type="Number">

<description>Optional time to wait before the progress gets shown.</description>

</param>

<param name="o" type="Object">

<description>Optional object to pass to the progress observers.</description>

</param>

<return type="Boolean">

<description>Same as the input state.</description>

</return>

<example>// Show progress for the active editor

tinyMCE.activeEditor.setProgressState(true);



// Hide progress for the active editor

tinyMCE.activeEditor.setProgressState(false);



// Show progress after 3 seconds

tinyMCE.activeEditor.setProgressState(true, 3000);</example>

</method>

<method name="load" summary="Loads contents from the textarea or div element that got converted into an editor instance.">

<description>Loads contents from the textarea or div element that got converted into an editor instance.

This method will move the contents from that textarea or div into the editor by using setContent

so all events etc that method has will get dispatched as well.

</description>

<param name="o" type="Object">

<description>Optional content object, this gets passed around through the whole load process.</description>

</param>

<return type="String">

<description>HTML string that got set into the editor.</description>

</return>

</method>

<method name="save" summary="Saves the contents from a editor out to the textarea or div element that got converted into an editor instance.">

<description>Saves the contents from a editor out to the textarea or div element that got converted into an editor instance.

This method will move the HTML contents from the editor into that textarea or div by getContent

so all events etc that method has will get dispatched as well.

</description>

<param name="o" type="Object">

<description>Optional content object, this gets passed around through the whole save process.</description>

</param>

<return type="String">

<description>HTML string that got set into the textarea/div.</description>

</return>

</method>

<method name="setContent" summary="Sets the specified content to the editor instance, this will cleanup the content before it gets set using the different ...">

<description>Sets the specified content to the editor instance, this will cleanup the content before it gets set using

the different cleanup rules options.

</description>

<param name="content" type="String">

<description>Content to set to editor, normally HTML contents but can be other formats as well.</description>

</param>

<param name="args" type="Object">

<description>Optional content object, this gets passed around through the whole set process.</description>

</param>

<return type="String">

<description>HTML string that got set into the editor.</description>

</return>

<example>// Sets the HTML contents of the activeEditor editor

tinyMCE.activeEditor.setContent('&lt;span&gt;some&lt;/span&gt; html');



// Sets the raw contents of the activeEditor editor

tinyMCE.activeEditor.setContent('&lt;span&gt;some&lt;/span&gt; html', {format : 'raw'});



// Sets the content of a specific editor (my_editor in this example)

tinyMCE.get('my_editor').setContent(data);



// Sets the bbcode contents of the activeEditor editor if the bbcode plugin was added

tinyMCE.activeEditor.setContent('[b]some[/b] html', {format : 'bbcode'});</example>

</method>

<method name="getContent" summary="Gets the content from the editor instance, this will cleanup the content before it gets returned using the different cle...">

<description>Gets the content from the editor instance, this will cleanup the content before it gets returned using

the different cleanup rules options.

</description>

<param name="args" type="Object">

<description>Optional content object, this gets passed around through the whole get process.</description>

</param>

<return type="String">

<description>Cleaned content string, normally HTML contents.</description>

</return>

<example>// Get the HTML contents of the currently active editor

console.debug(tinyMCE.activeEditor.getContent());



// Get the raw contents of the currently active editor

tinyMCE.activeEditor.getContent({format : 'raw'});



// Get content of a specific editor:

tinyMCE.get('content id').getContent()</example>

</method>

<method name="isDirty" summary="Returns true/false if the editor is dirty or not.">

<description>Returns true/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.

</description>

<return type="Boolean">

<description>True/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.</description>

</return>

<example>if (tinyMCE.activeEditor.isDirty())

    alert("You must save your contents.");</example>

</method>

<method name="getContainer" summary="Returns the editors container element.">

<description>Returns the editors container element. The container element wrappes in

all the elements added to the page for the editor. Such as UI, iframe etc.

</description>

<return type="Element">

<description>HTML DOM element for the editor container.</description>

</return>

</method>

<method name="getContentAreaContainer" summary="Returns the editors content area container element.">

<description>Returns the editors content area container element. The this element is the one who

holds the iframe or the editable element.

</description>

<return type="Element">

<description>HTML DOM element for the editor area container.</description>

</return>

</method>

<method name="getElement" summary="Returns the target element/textarea that got replaced with a TinyMCE editor instance.">

<description>Returns the target element/textarea that got replaced with a TinyMCE editor instance.

</description>

<return type="Element">

<description>HTML DOM element for the replaced element.</description>

</return>

</method>

<method name="getWin" summary="Returns the iframes window object.">

<description>Returns the iframes window object.

</description>

<return type="Window">

<description>Iframe DOM window object.</description>

</return>

</method>

<method name="getDoc" summary="Returns the iframes document object.">

<description>Returns the iframes document object.

</description>

<return type="Document">

<description>Iframe DOM document object.</description>

</return>

</method>

<method name="getBody" summary="Returns the iframes body element.">

<description>Returns the iframes body element.

</description>

<return type="Element">

<description>Iframe body element.</description>

</return>

</method>

<method name="convertURL" summary="URL converter function this gets executed each time a user adds an img, a or any other element that has a URL in it.">

<description>URL converter function this gets executed each time a user adds an img, a or

any other element that has a URL in it. This will be called both by the DOM and HTML

manipulation functions.

</description>

<param name="u" type="string">

<description>URL to convert.</description>

</param>

<param name="n" type="string">

<description>Attribute name src, href etc.</description>

</param>

<param name="Tag">

<type fullname="string"/>

<type fullname="HTMLElement"/>

<description>name or HTML DOM element depending on HTML or DOM insert.</description>

</param>

<return type="string">

<description>Converted URL string.</description>

</return>

</method>

<method name="addVisual" summary="Adds visual aid for tables, anchors etc so they can be more easily edited inside the editor.">

<description>Adds visual aid for tables, anchors etc so they can be more easily edited inside the editor.

</description>

<param name="e" type="Element">

<description>Optional root element to loop though to find tables etc that needs the visual aid.</description>

</param>

</method>

<method name="remove" summary="Removes the editor from the dom and tinymce collection.">

<description>Removes the editor from the dom and tinymce collection.

</description>

</method>

<method name="destroy" summary="Destroys the editor instance by removing all events, element references or other resources that could leak memory.">

<description>Destroys the editor instance by removing all events, element references or other resources

that could leak memory. This method will be called automatically when the page is unloaded

but you can also call it directly if you know what you are doing.

</description>

<param name="s" type="Boolean">

<description>Optional state if the destroy is an automatic destroy or user called one.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.EditorCommands" name="EditorCommands" summary="This class enables you to add custom editor commands and it contains overrides for native browser commands to address va...">

<description>This class enables you to add custom editor commands and it contains

overrides for native browser commands to address various bugs and issues.

</description>

<members>

<method name="execCommand" summary="Executes the specified command.">

<description>Executes the specified command.

</description>

<param name="command" type="String">

<description>Command to execute.</description>

</param>

<param name="ui" type="Boolean">

<description>Optional user interface state.</description>

</param>

<param name="value" type="Object">

<description>Optional value for command.</description>

</param>

<return type="Boolean">

<description>true/false if the command was found or not.</description>

</return>

</method>

<method name="queryCommandState" summary="Queries the current state for a command for example if the current selection is &quot;bold&quot;.">

<description>Queries the current state for a command for example if the current selection is "bold".

</description>

<param name="command" type="String">

<description>Command to check the state of.</description>

</param>

<return>

<type fullname="Boolean"/>

<type fullname="Number"/>

<description>true/false if the selected contents is bold or not, -1 if it's not found.</description>

</return>

</method>

<method name="queryCommandValue" summary="Queries the command value for example the current fontsize.">

<description>Queries the command value for example the current fontsize.

</description>

<param name="command" type="String">

<description>Command to check the value of.</description>

</param>

<return type="Object">

<description>Command value of false if it's not found.</description>

</return>

</method>

<method name="addCommands" summary="Adds commands to the command collection.">

<description>Adds commands to the command collection.

</description>

<param name="command_list" type="Object">

<description>Name/value collection with commands to add, the names can also be comma separated.</description>

</param>

<param name="type" type="String">

<description>Optional type to add, defaults to exec. Can be value or state as well.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.Formatter" name="Formatter" summary="Text formatter engine class.">

<description>Text formatter engine class. This class is used to apply formats like bold, italic, font size

etc to the current selection or specific nodes. This engine was build to replace the browsers

default formatting logic for execCommand due to it's inconsistant and buggy behavior.

</description>

<example>tinymce.activeEditor.formatter.register('mycustomformat', {

   inline : 'span',

   styles : {color : '#ff0000'}

 });



 tinymce.activeEditor.formatter.apply('mycustomformat');</example>

<members>

<method name="get" summary="Returns the format by name or all formats if no name is specified.">

<description>Returns the format by name or all formats if no name is specified.

</description>

<param name="name" type="String">

<description>Optional name to retrive by.</description>

</param>

<return>

<type fullname="Array"/>

<type fullname="Object"/>

<description>Array/Object with all registred formats or a specific format.</description>

</return>

</method>

<method name="register" summary="Registers a specific format by name.">

<description>Registers a specific format by name.

</description>

<param name="name">

<type fullname="Object"/>

<type fullname="String"/>

<description>Name of the format for example "bold".</description>

</param>

<param name="format">

<type fullname="Object"/>

<type fullname="Array"/>

<description>Optional format object or array of format variants can only be omitted if the first arg is an object.</description>

</param>

</method>

<method name="apply" summary="Applies the specified format to the current selection or specified node.">

<description>Applies the specified format to the current selection or specified node.

</description>

<param name="name" type="String">

<description>Name of format to apply.</description>

</param>

<param name="vars" type="Object">

<description>Optional list of variables to replace within format before applying it.</description>

</param>

<param name="node" type="Node">

<description>Optional node to apply the format to defaults to current selection.</description>

</param>

</method>

<method name="remove" summary="Removes the specified format from the current selection or specified node.">

<description>Removes the specified format from the current selection or specified node.

</description>

<param name="name" type="String">

<description>Name of format to remove.</description>

</param>

<param name="vars" type="Object">

<description>Optional list of variables to replace within format before removing it.</description>

</param>

<param name="node" type="Node">

<description>Optional node to remove the format from defaults to current selection.</description>

</param>

</method>

<method name="toggle" summary="Toggles the specified format on/off.">

<description>Toggles the specified format on/off.

</description>

<param name="name" type="String">

<description>Name of format to apply/remove.</description>

</param>

<param name="vars" type="Object">

<description>Optional list of variables to replace within format before applying/removing it.</description>

</param>

<param name="node" type="Node">

<description>Optional node to apply the format to or remove from. Defaults to current selection.</description>

</param>

</method>

<method name="matchNode" summary="Return true/false if the specified node has the specified format.">

<description>Return true/false if the specified node has the specified format.

</description>

<param name="node" type="Node">

<description>Node to check the format on.</description>

</param>

<param name="name" type="String">

<description>Format name to check.</description>

</param>

<param name="vars" type="Object">

<description>Optional list of variables to replace before checking it.</description>

</param>

<param name="similar" type="Boolean">

<description>Match format that has similar properties.</description>

</param>

<return type="Object">

<description>Returns the format object it matches or undefined if it doesn't match.</description>

</return>

</method>

<method name="match" summary="Matches the current selection or specified node against the specified format name.">

<description>Matches the current selection or specified node against the specified format name.

</description>

<param name="name" type="String">

<description>Name of format to match.</description>

</param>

<param name="vars" type="Object">

<description>Optional list of variables to replace before checking it.</description>

</param>

<param name="node" type="Node">

<description>Optional node to check.</description>

</param>

<return type="boolean">

<description>true/false if the specified selection/node matches the format.</description>

</return>

</method>

<method name="matchAll" summary="Matches the current selection against the array of formats and returns a new array with matching formats.">

<description>Matches the current selection against the array of formats and returns a new array with matching formats.

</description>

<param name="names" type="Array">

<description>Name of format to match.</description>

</param>

<param name="vars" type="Object">

<description>Optional list of variables to replace before checking it.</description>

</param>

<return type="Array">

<description>Array with matched formats.</description>

</return>

</method>

<method name="canApply" summary="Returns true/false if the specified format can be applied to the current selection or not.">

<description>Returns true/false if the specified format can be applied to the current selection or not. It will currently only check the state for selector formats, it returns true on all other format types.

</description>

<param name="name" type="String">

<description>Name of format to check.</description>

</param>

<return type="boolean">

<description>true/false if the specified format can be applied to the current selection/node.</description>

</return>

</method>

</members>

</class>

<class fullname="tinymce.UndoManager" name="UndoManager" summary="This class handles the undo/redo history levels for the editor.">

<description>This class handles the undo/redo history levels for the editor. Since the build in undo/redo has major drawbacks a custom one was needed.

</description>

<members>

<event name="onAdd" summary="This event will fire each time a new undo level is added to the undo manager.">

<description>This event will fire each time a new undo level is added to the undo manager.

</description>

<param name="sender" type="tinymce.UndoManager">

<description>UndoManager instance that got the new level.</description>

</param>

<param name="level" type="Object">

<description>The new level object containing a bookmark and contents.</description>

</param>

</event>

<event name="onUndo" summary="This event will fire when the user make an undo of a change.">

<description>This event will fire when the user make an undo of a change.

</description>

<param name="sender" type="tinymce.UndoManager">

<description>UndoManager instance that got the new level.</description>

</param>

<param name="level" type="Object">

<description>The old level object containing a bookmark and contents.</description>

</param>

</event>

<event name="onRedo" summary="This event will fire when the user make an redo of a change.">

<description>This event will fire when the user make an redo of a change.

</description>

<param name="sender" type="tinymce.UndoManager">

<description>UndoManager instance that got the new level.</description>

</param>

<param name="level" type="Object">

<description>The old level object containing a bookmark and contents.</description>

</param>

</event>

<method name="beforeChange" summary="Stores away a bookmark to be used when performing an undo action so that the selection is before the change has been mad...">

<description>Stores away a bookmark to be used when performing an undo action so that the selection is before

the change has been made.

</description>

</method>

<method name="add" summary="Adds a new undo level/snapshot to the undo list.">

<description>Adds a new undo level/snapshot to the undo list.

</description>

<param name="l" type="Object">

<description>Optional undo level object to add.</description>

</param>

<return type="Object">

<description>Undo level that got added or null it a level wasn't needed.</description>

</return>

</method>

<method name="undo" summary="Undoes the last action.">

<description>Undoes the last action.

</description>

<return type="Object">

<description>Undo level or null if no undo was performed.</description>

</return>

</method>

<method name="redo" summary="Redoes the last action.">

<description>Redoes the last action.

</description>

<return type="Object">

<description>Redo level or null if no redo was performed.</description>

</return>

</method>

<method name="clear" summary="Removes all undo levels.">

<description>Removes all undo levels.

</description>

</method>

<method name="hasUndo" summary="Returns true/false if the undo manager has any undo levels.">

<description>Returns true/false if the undo manager has any undo levels.

</description>

<return type="Boolean">

<description>true/false if the undo manager has any undo levels.</description>

</return>

</method>

<method name="hasRedo" summary="Returns true/false if the undo manager has any redo levels.">

<description>Returns true/false if the undo manager has any redo levels.

</description>

<return type="Boolean">

<description>true/false if the undo manager has any redo levels.</description>

</return>

</method>

</members>

</class>

<class fullname="tinymce.WindowManager" name="WindowManager" summary="This class handles the creation of native windows and dialogs.">

<description>This class handles the creation of native windows and dialogs. This class can be extended to provide for example inline dialogs.

</description>

<example>// Opens a new dialog with the file.htm file and the size 320x240

// It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.

tinyMCE.activeEditor.windowManager.open({

   url : 'file.htm',

   width : 320,

   height : 240

}, {

   custom_param : 1

});



// Displays an alert box using the active editors window manager instance

tinyMCE.activeEditor.windowManager.alert('Hello world!');



// Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm

tinyMCE.activeEditor.windowManager.confirm("Do you want to do something", function(s) {

   if (s)

      tinyMCE.activeEditor.windowManager.alert("Ok");

   else

      tinyMCE.activeEditor.windowManager.alert("Cancel");

});</example>

<members>

<method constructor="true" name="WindowManager" summary="Constructs a new window manager instance.">

<description>Constructs a new window manager instance.

</description>

<param name="ed" type="tinymce.Editor">

<description>Editor instance that the windows are bound to.</description>

</param>

</method>

<method name="open" summary="Opens a new window.">

<description>Opens a new window.

</description>

<param name="s" type="Object">

<description>Optional name/value settings collection contains things like width/height/url etc.</description>

<option name="title" type="String">

<description>Window title.</description>

</option>

<option name="file" type="String">

<description>URL of the file to open in the window.</description>

</option>

<option name="width" type="Number">

<description>Width in pixels.</description>

</option>

<option name="height" type="Number">

<description>Height in pixels.</description>

</option>

<option name="resizable" type="Boolean">

<description>Specifies whether the popup window is resizable or not.</description>

</option>

<option name="maximizable" type="Boolean">

<description>Specifies whether the popup window has a "maximize" button and can get maximized or not.</description>

</option>

<option name="inline" type="Boolean">

<description>Specifies whether to display in-line (set to 1 or true for in-line display; requires inlinepopups plugin).</description>

</option>

<option name="popup_css">

<type fullname="String"/>

<type fullname="Boolean"/>

<description>Optional CSS to use in the popup. Set to false to remove the default one.</description>

</option>

<option name="translate_i18n" type="Boolean">

<description>Specifies whether translation should occur or not of i18 key strings. Default is true.</description>

</option>

<option name="close_previous">

<type fullname="String"/>

<type fullname="bool"/>

<description>Specifies whether a previously opened popup window is to be closed or not (like when calling the file browser window over the advlink popup).</description>

</option>

<option name="scrollbars">

<type fullname="String"/>

<type fullname="bool"/>

<description>Specifies whether the popup window can have scrollbars if required (i.e. content larger than the popup size specified).</description>

</option>

</param>

<param name="p" type="Object">

<description>Optional parameters/arguments collection can be used by the dialogs to retrive custom parameters.</description>

<option name="plugin_url" type="String">

<description>url to plugin if opening plugin window that calls tinyMCEPopup.requireLangPack() and needs access to the plugin language js files</description>

</option>

</param>

</method>

<method name="close" summary="Closes the specified window.">

<description>Closes the specified window. This will also dispatch out a onClose event.

</description>

<param name="w" type="Window">

<description>Native window object to close.</description>

</param>

</method>

<method name="createInstance" summary="Creates a instance of a class.">

<description>Creates a instance of a class. This method was needed since IE can't create instances

of classes from a parent window due to some reference problem. Any arguments passed after the class name

will be passed as arguments to the constructor.

</description>

<param name="cl" type="String">

<description>Class name to create an instance of.</description>

</param>

<return type="Object">

<description>Instance of the specified class.</description>

</return>

<example>var uri = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.URI', 'http://www.somesite.com');

alert(uri.getURI());</example>

</method>

<method name="confirm" summary="Creates a confirm dialog.">

<description>Creates a confirm dialog. Please don't use the blocking behavior of this

native version use the callback method instead then it can be extended.

</description>

<param name="t" type="String">

<description>Title for the new confirm dialog.</description>

</param>

<param name="cb" type="function">

<description>Callback function to be executed after the user has selected ok or cancel.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the callback in.</description>

</param>

<example>// Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm

tinyMCE.activeEditor.windowManager.confirm("Do you want to do something", function(s) {

   if (s)

      tinyMCE.activeEditor.windowManager.alert("Ok");

   else

      tinyMCE.activeEditor.windowManager.alert("Cancel");

});</example>

</method>

<method name="alert" summary="Creates a alert dialog.">

<description>Creates a alert dialog. Please don't use the blocking behavior of this

native version use the callback method instead then it can be extended.

</description>

<param name="t" type="String">

<description>Title for the new alert dialog.</description>

</param>

<param name="cb" type="function">

<description>Callback function to be executed after the user has selected ok.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the callback in.</description>

</param>

<example>// Displays an alert box using the active editors window manager instance

tinyMCE.activeEditor.windowManager.alert('Hello world!');</example>

</method>

</members>

</class>

<namespace fullname="tinymce.dom" name="dom">

<description>Contains classes for handling the browsers DOM.</description>

<class fullname="tinymce.dom.DOMUtils" name="DOMUtils" summary="Utility class for various DOM manipulation and retrival functions.">

<description>Utility class for various DOM manipulation and retrival functions.

</description>

<example>// Add a class to an element by id in the page

tinymce.DOM.addClass('someid', 'someclass');



// Add a class to an element by id inside the editor

tinyMCE.activeEditor.dom.addClass('someid', 'someclass');</example>

<members>

<method constructor="true" name="DOMUtils" summary="Constructs a new DOMUtils instance.">

<description>Constructs a new DOMUtils instance. Consult the Wiki for more details on settings etc for this class.

</description>

<param name="d" type="Document">

<description>Document reference to bind the utility class to.</description>

</param>

<param name="s" type="settings">

<description>Optional settings collection.</description>

</param>

</method>

<method name="getRoot" summary="Returns the root node of the document this is normally the body but might be a DIV.">

<description>Returns the root node of the document this is normally the body but might be a DIV. Parents like getParent will not

go above the point of this root node.

</description>

<return type="Element">

<description>Root element for the utility class.</description>

</return>

</method>

<method name="getViewPort" summary="Returns the viewport of the window.">

<description>Returns the viewport of the window.

</description>

<param name="w" type="Window">

<description>Optional window to get viewport of.</description>

</param>

<return type="Object">

<description>Viewport object with fields x, y, w and h.</description>

</return>

</method>

<method name="getRect" summary="Returns the rectangle for a specific element.">

<description>Returns the rectangle for a specific element.

</description>

<param name="e">

<type fullname="Element"/>

<type fullname="String"/>

<description>Element object or element ID to get rectange from.</description>

</param>

<return type="object">

<description>Rectange for specified element object with x, y, w, h fields.</description>

</return>

</method>

<method name="getSize" summary="Returns the size dimensions of the specified element.">

<description>Returns the size dimensions of the specified element.

</description>

<param name="e">

<type fullname="Element"/>

<type fullname="String"/>

<description>Element object or element ID to get rectange from.</description>

</param>

<return type="object">

<description>Rectange for specified element object with w, h fields.</description>

</return>

</method>

<method name="getParent" summary="Returns a node by the specified selector function.">

<description>Returns a node by the specified selector function. This function will

loop through all parent nodes and call the specified function for each node.

If the function then returns true indicating that it has found what it was looking for, the loop execution will then end

and the node it found will be returned.

</description>

<param name="n">

<type fullname="Node"/>

<type fullname="String"/>

<description>DOM node to search parents on or ID string.</description>

</param>

<param name="f" type="function">

<description>Selection function to execute on each node or CSS pattern.</description>

</param>

<param name="r" type="Node">

<description>Optional root element, never go below this point.</description>

</param>

<return type="Node">

<description>DOM Node or null if it wasn't found.</description>

</return>

</method>

<method name="getParents" summary="Returns a node list of all parents matching the specified selector function or pattern.">

<description>Returns a node list of all parents matching the specified selector function or pattern.

If the function then returns true indicating that it has found what it was looking for and that node will be collected.

</description>

<param name="n">

<type fullname="Node"/>

<type fullname="String"/>

<description>DOM node to search parents on or ID string.</description>

</param>

<param name="f" type="function">

<description>Selection function to execute on each node or CSS pattern.</description>

</param>

<param name="r" type="Node">

<description>Optional root element, never go below this point.</description>

</param>

<return type="Array">

<description>Array of nodes or null if it wasn't found.</description>

</return>

</method>

<method name="get" summary="Returns the specified element by ID or the input element if it isn't a string.">

<description>Returns the specified element by ID or the input element if it isn't a string.

</description>

<param name="n">

<type fullname="String"/>

<type fullname="Element"/>

<description>Element id to look for or element to just pass though.</description>

</param>

<return type="Element">

<description>Element matching the specified id or null if it wasn't found.</description>

</return>

</method>

<method name="getNext" summary="Returns the next node that matches selector or function">

<description>Returns the next node that matches selector or function

</description>

<param name="node" type="Node">

<description>Node to find siblings from.</description>

</param>

<param name="selector">

<type fullname="String"/>

<type fullname="function"/>

<description>Selector CSS expression or function.</description>

</param>

<return type="Node">

<description>Next node item matching the selector or null if it wasn't found.</description>

</return>

</method>

<method name="getPrev" summary="Returns the previous node that matches selector or function">

<description>Returns the previous node that matches selector or function

</description>

<param name="node" type="Node">

<description>Node to find siblings from.</description>

</param>

<param name="selector">

<type fullname="String"/>

<type fullname="function"/>

<description>Selector CSS expression or function.</description>

</param>

<return type="Node">

<description>Previous node item matching the selector or null if it wasn't found.</description>

</return>

</method>

<method name="select" summary="Selects specific elements by a CSS level 3 pattern.">

<description>Selects specific elements by a CSS level 3 pattern. For example "div#a1 p.test".

This function is optimized for the most common patterns needed in TinyMCE but it also performes good enough

on more complex patterns.

</description>

<param name="p" type="String">

<description>CSS level 1 pattern to select/find elements by.</description>

</param>

<param name="s" type="Object">

<description>Optional root element/scope element to search in.</description>

</param>

<return type="Array">

<description>Array with all matched elements.</description>

</return>

<example>// Adds a class to all paragraphs in the currently active editor

tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass');



// Adds a class to all spans that has the test class in the currently active editor

tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('span.test'), 'someclass')</example>

</method>

<method name="is" summary="Returns true/false if the specified element matches the specified css pattern.">

<description>Returns true/false if the specified element matches the specified css pattern.

</description>

<param name="n">

<type fullname="Node"/>

<type fullname="NodeList"/>

<description>DOM node to match or an array of nodes to match.</description>

</param>

<param name="selector" type="String">

<description>CSS pattern to match the element agains.</description>

</param>

</method>

<method name="add" summary="Adds the specified element to another element or elements.">

<description>Adds the specified element to another element or elements.

</description>

<param name="Element">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>id string, DOM node element or array of id's or elements to add to.</description>

</param>

<param name="n">

<type fullname="String"/>

<type fullname="Element"/>

<description>Name of new element to add or existing element to add.</description>

</param>

<param name="a" type="Object">

<description>Optional object collection with arguments to add to the new element(s).</description>

</param>

<param name="h" type="String">

<description>Optional inner HTML contents to add for each element.</description>

</param>

<param name="c" type="Boolean">

<description>Optional internal state to indicate if it should create or add.</description>

</param>

<return>

<type fullname="Element"/>

<type fullname="Array"/>

<description>Element that got created or array with elements if multiple elements where passed.</description>

</return>

<example>// Adds a new paragraph to the end of the active editor

tinyMCE.activeEditor.dom.add(tinyMCE.activeEditor.getBody(), 'p', {title : 'my title'}, 'Some content');</example>

</method>

<method name="create" summary="Creates a new element.">

<description>Creates a new element.

</description>

<param name="n" type="String">

<description>Name of new element.</description>

</param>

<param name="a" type="Object">

<description>Optional object name/value collection with element attributes.</description>

</param>

<param name="h" type="String">

<description>Optional HTML string to set as inner HTML of the element.</description>

</param>

<return type="Element">

<description>HTML DOM node element that got created.</description>

</return>

<example>// Adds an element where the caret/selection is in the active editor

var el = tinyMCE.activeEditor.dom.create('div', {id : 'test', 'class' : 'myclass'}, 'some content');

tinyMCE.activeEditor.selection.setNode(el);</example>

</method>

<method name="createHTML" summary="Create HTML string for element.">

<description>Create HTML string for element. The element will be closed unless an empty inner HTML string is passed.

</description>

<param name="n" type="String">

<description>Name of new element.</description>

</param>

<param name="a" type="Object">

<description>Optional object name/value collection with element attributes.</description>

</param>

<param name="h" type="String">

<description>Optional HTML string to set as inner HTML of the element.</description>

</param>

<return type="String">

<description>String with new HTML element like for example: &lt;a href="#"&gt;test&lt;/a&gt;.</description>

</return>

<example>// Creates a html chunk and inserts it at the current selection/caret location

tinyMCE.activeEditor.selection.setContent(tinyMCE.activeEditor.dom.createHTML('a', {href : 'test.html'}, 'some line'));</example>

</method>

<method name="remove" summary="Removes/deletes the specified element(s) from the DOM.">

<description>Removes/deletes the specified element(s) from the DOM.

</description>

<param name="node">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>ID of element or DOM element object or array containing multiple elements/ids.</description>

</param>

<param name="keep_children" type="Boolean">

<description>Optional state to keep children or not. If set to true all children will be placed at the location of the removed element.</description>

</param>

<return>

<type fullname="Element"/>

<type fullname="Array"/>

<description>HTML DOM element that got removed or array of elements depending on input.</description>

</return>

<example>// Removes all paragraphs in the active editor

tinyMCE.activeEditor.dom.remove(tinyMCE.activeEditor.dom.select('p'));



// Removes a element by id in the document

tinyMCE.DOM.remove('mydiv');</example>

</method>

<method name="setStyle" summary="Sets the CSS style value on a HTML element.">

<description>Sets the CSS style value on a HTML element. The name can be a camelcase string

or the CSS style name like background-color.

</description>

<param name="n">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>HTML element/Element ID or Array of elements/ids to set CSS style value on.</description>

</param>

<param name="na" type="String">

<description>Name of the style value to set.</description>

</param>

<param name="v" type="String">

<description>Value to set on the style.</description>

</param>

<example>// Sets a style value on all paragraphs in the currently active editor

tinyMCE.activeEditor.dom.setStyle(tinyMCE.activeEditor.dom.select('p'), 'background-color', 'red');



// Sets a style value to an element by id in the current document

tinyMCE.DOM.setStyle('mydiv', 'background-color', 'red');</example>

</method>

<method name="getStyle" summary="Returns the current style or runtime/computed value of a element.">

<description>Returns the current style or runtime/computed value of a element.

</description>

<param name="n">

<type fullname="String"/>

<type fullname="Element"/>

<description>HTML element or element id string to get style from.</description>

</param>

<param name="na" type="String">

<description>Style name to return.</description>

</param>

<param name="c" type="Boolean">

<description>Computed style.</description>

</param>

<return type="String">

<description>Current style or computed style value of a element.</description>

</return>

</method>

<method name="setStyles" summary="Sets multiple styles on the specified element(s).">

<description>Sets multiple styles on the specified element(s).

</description>

<param name="e">

<type fullname="Element"/>

<type fullname="String"/>

<type fullname="Array"/>

<description>DOM element, element id string or array of elements/ids to set styles on.</description>

</param>

<param name="o" type="Object">

<description>Name/Value collection of style items to add to the element(s).</description>

</param>

<example>// Sets styles on all paragraphs in the currently active editor

tinyMCE.activeEditor.dom.setStyles(tinyMCE.activeEditor.dom.select('p'), {'background-color' : 'red', 'color' : 'green'});



// Sets styles to an element by id in the current document

tinyMCE.DOM.setStyles('mydiv', {'background-color' : 'red', 'color' : 'green'});</example>

</method>

<method name="setAttrib" summary="Sets the specified attributes value of a element or elements.">

<description>Sets the specified attributes value of a element or elements.

</description>

<param name="e">

<type fullname="Element"/>

<type fullname="String"/>

<type fullname="Array"/>

<description>DOM element, element id string or array of elements/ids to set attribute on.</description>

</param>

<param name="n" type="String">

<description>Name of attribute to set.</description>

</param>

<param name="v" type="String">

<description>Value to set on the attribute of this value is falsy like null 0 or '' it will remove the attribute instead.</description>

</param>

<example>// Sets an attribute to all paragraphs in the active editor

tinyMCE.activeEditor.dom.setAttrib(tinyMCE.activeEditor.dom.select('p'), 'class', 'myclass');



// Sets an attribute to a specific element in the current page

tinyMCE.dom.setAttrib('mydiv', 'class', 'myclass');</example>

</method>

<method name="setAttribs" summary="Sets the specified attributes of a element or elements.">

<description>Sets the specified attributes of a element or elements.

</description>

<param name="e">

<type fullname="Element"/>

<type fullname="String"/>

<type fullname="Array"/>

<description>DOM element, element id string or array of elements/ids to set attributes on.</description>

</param>

<param name="o" type="Object">

<description>Name/Value collection of attribute items to add to the element(s).</description>

</param>

<example>// Sets some attributes to all paragraphs in the active editor

tinyMCE.activeEditor.dom.setAttribs(tinyMCE.activeEditor.dom.select('p'), {'class' : 'myclass', title : 'some title'});



// Sets some attributes to a specific element in the current page

tinyMCE.DOM.setAttribs('mydiv', {'class' : 'myclass', title : 'some title'});</example>

</method>

<method name="getAttrib" summary="Returns the specified attribute by name.">

<description>Returns the specified attribute by name.

</description>

<param name="e">

<type fullname="String"/>

<type fullname="Element"/>

<description>Element string id or DOM element to get attribute from.</description>

</param>

<param name="n" type="String">

<description>Name of attribute to get.</description>

</param>

<param name="dv" type="String">

<description>Optional default value to return if the attribute didn't exist.</description>

</param>

<return type="String">

<description>Attribute value string, default value or null if the attribute wasn't found.</description>

</return>

</method>

<method name="getPos" summary="Returns the absolute x, y position of a node.">

<description>Returns the absolute x, y position of a node. The position will be returned in a object with x, y fields.

</description>

<param name="n">

<type fullname="Element"/>

<type fullname="String"/>

<description>HTML element or element id to get x, y position from.</description>

</param>

<param name="ro" type="Element">

<description>Optional root element to stop calculations at.</description>

</param>

<return type="object">

<description>Absolute position of the specified element object with x, y fields.</description>

</return>

</method>

<method name="parseStyle" summary="Parses the specified style value into an object collection.">

<description>Parses the specified style value into an object collection. This parser will also

merge and remove any redundant items that browsers might have added. It will also convert non hex

colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.

</description>

<param name="st" type="String">

<description>Style value to parse for example: border:1px solid red;.</description>

</param>

<return type="Object">

<description>Object representation of that style like {border : '1px solid red'}</description>

</return>

</method>

<method name="serializeStyle" summary="Serializes the specified style object into a string.">

<description>Serializes the specified style object into a string.

</description>

<param name="o" type="Object">

<description>Object to serialize as string for example: {border : '1px solid red'}</description>

</param>

<param name="name" type="String">

<description>Optional element name.</description>

</param>

<return type="String">

<description>String representation of the style object for example: border: 1px solid red.</description>

</return>

</method>

<method name="loadCSS" summary="Imports/loads the specified CSS file into the document bound to the class.">

<description>Imports/loads the specified CSS file into the document bound to the class.

</description>

<param name="u" type="String">

<description>URL to CSS file to load.</description>

</param>

<example>// Loads a CSS file dynamically into the current document

tinymce.DOM.loadCSS('somepath/some.css');



// Loads a CSS file into the currently active editor instance

tinyMCE.activeEditor.dom.loadCSS('somepath/some.css');



// Loads a CSS file into an editor instance by id

tinyMCE.get('someid').dom.loadCSS('somepath/some.css');



// Loads multiple CSS files into the current document

tinymce.DOM.loadCSS('somepath/some.css,somepath/someother.css');</example>

</method>

<method name="addClass" summary="Adds a class to the specified element or elements.">

<description>Adds a class to the specified element or elements.

</description>

<param name="Element">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>ID string or DOM element or array with elements or IDs.</description>

</param>

<param name="c" type="String">

<description>Class name to add to each element.</description>

</param>

<return>

<type fullname="String"/>

<type fullname="Array"/>

<description>String with new class value or array with new class values for all elements.</description>

</return>

<example>// Adds a class to all paragraphs in the active editor

tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'myclass');



// Adds a class to a specific element in the current page

tinyMCE.DOM.addClass('mydiv', 'myclass');</example>

</method>

<method name="removeClass" summary="Removes a class from the specified element or elements.">

<description>Removes a class from the specified element or elements.

</description>

<param name="Element">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>ID string or DOM element or array with elements or IDs.</description>

</param>

<param name="c" type="String">

<description>Class name to remove to each element.</description>

</param>

<return>

<type fullname="String"/>

<type fullname="Array"/>

<description>String with new class value or array with new class values for all elements.</description>

</return>

<example>// Removes a class from all paragraphs in the active editor

tinyMCE.activeEditor.dom.removeClass(tinyMCE.activeEditor.dom.select('p'), 'myclass');



// Removes a class from a specific element in the current page

tinyMCE.DOM.removeClass('mydiv', 'myclass');</example>

</method>

<method name="hasClass" summary="Returns true if the specified element has the specified class.">

<description>Returns true if the specified element has the specified class.

</description>

<param name="n">

<type fullname="String"/>

<type fullname="Element"/>

<description>HTML element or element id string to check CSS class on.</description>

</param>

<param name="c" type="String">

<description>CSS class to check for.</description>

</param>

<return type="Boolean">

<description>true/false if the specified element has the specified class.</description>

</return>

</method>

<method name="show" summary="Shows the specified element(s) by ID by setting the &quot;display&quot; style.">

<description>Shows the specified element(s) by ID by setting the "display" style.

</description>

<param name="e">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>ID of DOM element or DOM element or array with elements or IDs to show.</description>

</param>

</method>

<method name="hide" summary="Hides the specified element(s) by ID by setting the &quot;display&quot; style.">

<description>Hides the specified element(s) by ID by setting the "display" style.

</description>

<param name="e">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>ID of DOM element or DOM element or array with elements or IDs to hide.</description>

</param>

<example>// Hides a element by id in the document

tinymce.DOM.hide('myid');</example>

</method>

<method name="isHidden" summary="Returns true/false if the element is hidden or not by checking the &quot;display&quot; style.">

<description>Returns true/false if the element is hidden or not by checking the "display" style.

</description>

<param name="e">

<type fullname="String"/>

<type fullname="Element"/>

<description>Id or element to check display state on.</description>

</param>

<return type="Boolean">

<description>true/false if the element is hidden or not.</description>

</return>

</method>

<method name="uniqueId" summary="Returns a unique id.">

<description>Returns a unique id. This can be useful when generating elements on the fly.

This method will not check if the element allready exists.

</description>

<param name="p" type="String">

<description>Optional prefix to add infront of all ids defaults to "mce_".</description>

</param>

<return type="String">

<description>Unique id.</description>

</return>

</method>

<method name="setHTML" summary="Sets the specified HTML content inside the element or elements.">

<description>Sets the specified HTML content inside the element or elements. The HTML will first be processed this means

URLs will get converted, hex color values fixed etc. Check processHTML for details.

</description>

<param name="e">

<type fullname="Element"/>

<type fullname="String"/>

<type fullname="Array"/>

<description>DOM element, element id string or array of elements/ids to set HTML inside.</description>

</param>

<param name="h" type="String">

<description>HTML content to set as inner HTML of the element.</description>

</param>

<example>// Sets the inner HTML of all paragraphs in the active editor

tinyMCE.activeEditor.dom.setHTML(tinyMCE.activeEditor.dom.select('p'), 'some inner html');



// Sets the inner HTML of a element by id in the document

tinyMCE.DOM.setHTML('mydiv', 'some inner html');</example>

</method>

<method name="getOuterHTML" summary="Returns the outer HTML of an element.">

<description>Returns the outer HTML of an element.

</description>

<param name="elm">

<type fullname="String"/>

<type fullname="Element"/>

<description>Element ID or element object to get outer HTML from.</description>

</param>

<return type="String">

<description>Outer HTML string.</description>

</return>

<example>tinymce.DOM.getOuterHTML(editorElement);

tinyMCE.activeEditor.getOuterHTML(tinyMCE.activeEditor.getBody());</example>

</method>

<method name="setOuterHTML" summary="Sets the specified outer HTML on a element or elements.">

<description>Sets the specified outer HTML on a element or elements.

</description>

<param name="e">

<type fullname="Element"/>

<type fullname="String"/>

<type fullname="Array"/>

<description>DOM element, element id string or array of elements/ids to set outer HTML on.</description>

</param>

<param name="h" type="Object">

<description>HTML code to set as outer value for the element.</description>

</param>

<param name="d" type="Document">

<description>Optional document scope to use in this process defaults to the document of the DOM class.</description>

</param>

<example>// Sets the outer HTML of all paragraphs in the active editor

tinyMCE.activeEditor.dom.setOuterHTML(tinyMCE.activeEditor.dom.select('p'), '&lt;div&gt;some html&lt;/div&gt;');



// Sets the outer HTML of a element by id in the document

tinyMCE.DOM.setOuterHTML('mydiv', '&lt;div&gt;some html&lt;/div&gt;');</example>

</method>

<method name="decode" summary="Entity decode a string, resolves any HTML entities like &amp;aring;.">

<description>Entity decode a string, resolves any HTML entities like &amp;aring;.

</description>

<param name="s" type="String">

<description>String to decode entities on.</description>

</param>

<return type="String">

<description>Entity decoded string.</description>

</return>

</method>

<method name="encode" summary="Entity encodes a string, encodes the most common entities &lt;&gt;&quot;&amp; into entities.">

<description>Entity encodes a string, encodes the most common entities &lt;&gt;"&amp; into entities.

</description>

<param name="text" type="String">

<description>String to encode with entities.</description>

</param>

<return type="String">

<description>Entity encoded string.</description>

</return>

</method>

<method name="insertAfter" summary="Inserts a element after the reference element.">

<description>Inserts a element after the reference element.

</description>

<param name="node" type="Element">

<description>Element to insert after the reference.</description>

</param>

<param name="reference_node">

<type fullname="Element"/>

<type fullname="String"/>

<type fullname="Array"/>

<description>Reference element, element id or array of elements to insert after.</description>

</param>

<return>

<type fullname="Element"/>

<type fullname="Array"/>

<description>Element that got added or an array with elements.</description>

</return>

</method>

<method name="isBlock" summary="Returns true/false if the specified element is a block element or not.">

<description>Returns true/false if the specified element is a block element or not.

</description>

<param name="node">

<type fullname="Node"/>

<type fullname="String"/>

<description>Element/Node to check.</description>

</param>

<return type="Boolean">

<description>True/False state if the node is a block element or not.</description>

</return>

</method>

<method name="replace" summary="Replaces the specified element or elements with the specified element, the new element will be cloned if multiple inputs...">

<description>Replaces the specified element or elements with the specified element, the new element will

be cloned if multiple inputs elements are passed.

</description>

<param name="n" type="Element">

<description>New element to replace old ones with.</description>

</param>

<param name="o">

<type fullname="Element"/>

<type fullname="String"/>

<type fullname="Array"/>

<description>Element DOM node, element id or array of elements or ids to replace.</description>

</param>

<param name="k" type="Boolean">

<description>Optional keep children state, if set to true child nodes from the old object will be added to new ones.</description>

</param>

</method>

<method name="rename" summary="Renames the specified element to a new name and keep it's attributes and children.">

<description>Renames the specified element to a new name and keep it's attributes and children.

</description>

<param name="elm" type="Element">

<description>Element to rename.</description>

</param>

<param name="name" type="String">

<description>Name of the new element.</description>

</param>

<return type="Object">

<description>New element or the old element if it needed renaming.</description>

</return>

</method>

<method name="findCommonAncestor" summary="Find the common ancestor of two elements.">

<description>Find the common ancestor of two elements. This is a shorter method than using the DOM Range logic.

</description>

<param name="a" type="Element">

<description>Element to find common ancestor of.</description>

</param>

<param name="b" type="Element">

<description>Element to find common ancestor of.</description>

</param>

<return type="Element">

<description>Common ancestor element of the two input elements.</description>

</return>

</method>

<method name="toHex" summary="Parses the specified RGB color value and returns a hex version of that color.">

<description>Parses the specified RGB color value and returns a hex version of that color.

</description>

<param name="s" type="String">

<description>RGB string value like rgb(1,2,3)</description>

</param>

<return type="String">

<description>Hex version of that RGB value like #FF00FF.</description>

</return>

</method>

<method name="getClasses" summary="Returns a array of all single CSS classes in the document.">

<description>Returns a array of all single CSS classes in the document. A single CSS class is a simple

rule like ".class" complex ones like "div td.class" will not be added to output.

</description>

<return type="Array">

<description>Array with class objects each object has a class field might be other fields in the future.</description>

</return>

</method>

<method name="run" summary="Executes the specified function on the element by id or dom element node or array of elements/id.">

<description>Executes the specified function on the element by id or dom element node or array of elements/id.

</description>

<param name="Element">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>ID or DOM element object or array with ids or elements.</description>

</param>

<param name="f" type="function">

<description>Function to execute for each item.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

<return>

<type fullname="Object"/>

<type fullname="Array"/>

<description>Single object or array with objects depending on multiple input or not.</description>

</return>

</method>

<method name="getAttribs" summary="Returns an NodeList with attributes for the element.">

<description>Returns an NodeList with attributes for the element.

</description>

<param name="n">

<type fullname="HTMLElement"/>

<type fullname="string"/>

<description>Element node or string id to get attributes from.</description>

</param>

<return type="NodeList">

<description>NodeList with attributes.</description>

</return>

</method>

<method name="isEmpty" summary="Returns true/false if the specified node is to be considered empty or not.">

<description>Returns true/false if the specified node is to be considered empty or not.

</description>

<param name="elements" type="Object">

<description>Optional name/value object with elements that are automatically treated as non empty elements.</description>

</param>

<return type="Boolean">

<description>true/false if the node is empty or not.</description>

</return>

<example>tinymce.DOM.isEmpty(node, {img : true});</example>

</method>

<method name="destroy" summary="Destroys all internal references to the DOM to solve IE leak issues.">

<description>Destroys all internal references to the DOM to solve IE leak issues.

</description>

</method>

<method name="createRng" summary="Created a new DOM Range object.">

<description>Created a new DOM Range object. This will use the native DOM Range API if it's

available if it's not it will fallback to the custom TinyMCE implementation.

</description>

<return type="DOMRange">

<description>DOM Range object.</description>

</return>

<example>var rng = tinymce.DOM.createRng();

alert(rng.startContainer + "," + rng.startOffset);</example>

</method>

<method name="split" summary="Splits an element into two new elements and places the specified split element or element between the new ones.">

<description>Splits an element into two new elements and places the specified split

element or element between the new ones. For example splitting the paragraph at the bold element in

this example &lt;p&gt;abc&lt;b&gt;abc&lt;/b&gt;123&lt;/p&gt; would produce &lt;p&gt;abc&lt;/p&gt;&lt;b&gt;abc&lt;/b&gt;&lt;p&gt;123&lt;/p&gt;.

</description>

<param name="pe" type="Element">

<description>Parent element to split.</description>

</param>

<param name="e" type="Element">

<description>Element to split at.</description>

</param>

<param name="re" type="Element">

<description>Optional replacement element to replace the split element by.</description>

</param>

<return type="Element">

<description>Returns the split element or the replacement element if that is specified.</description>

</return>

</method>

<method name="bind" summary="Adds an event handler to the specified object.">

<description>Adds an event handler to the specified object.

</description>

<param name="o">

<type fullname="Element"/>

<type fullname="Document"/>

<type fullname="Window"/>

<type fullname="Array"/>

<type fullname="String"/>

<description>Object or element id string to add event handler to or an array of elements/ids/documents.</description>

</param>

<param name="n" type="String">

<description>Name of event handler to add for example: click.</description>

</param>

<param name="f" type="function">

<description>Function to execute when the event occurs.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

<return type="function">

<description>Function callback handler the same as the one passed in.</description>

</return>

</method>

<method name="unbind" summary="Removes the specified event handler by name and function from a element or collection of elements.">

<description>Removes the specified event handler by name and function from a element or collection of elements.

</description>

<param name="o">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>Element ID string or HTML element or an array of elements or ids to remove handler from.</description>

</param>

<param name="n" type="String">

<description>Event handler name like for example: "click"</description>

</param>

<param name="f" type="function">

<description>Function to remove.</description>

</param>

<return>

<type fullname="bool"/>

<type fullname="Array"/>

<description>Bool state if true if the handler was removed or an array with states if multiple elements where passed in.</description>

</return>

</method>

</members>

</class>

<class fullname="tinymce.dom.Element" name="Element" summary="Element class, this enables element blocking in IE.">

<description>Element class, this enables element blocking in IE. Element blocking is a method to block out select blockes that

gets visible though DIVs on IE 6 it uses a iframe for this blocking. This class also shortens the length of some DOM API calls

since it's bound to an element.

</description>

<example>// Creates an basic element for an existing element

var elm = new tinymce.dom.Element('someid');



elm.setStyle('background-color', 'red');

elm.moveTo(10, 10);</example>

<members>

<method constructor="true" name="Element" summary="Constructs a new Element instance.">

<description>Constructs a new Element instance. Consult the Wiki for more details on this class.

</description>

<param name="id" type="String">

<description>Element ID to bind/execute methods on.</description>

</param>

<param name="settings" type="Object">

<description>Optional settings name/value collection.</description>

</param>

</method>

<method name="on" summary="Adds a event handler to the element.">

<description>Adds a event handler to the element.

</description>

<param name="n" type="String">

<description>Event name like for example "click".</description>

</param>

<param name="f" type="function">

<description>Function to execute on the specified event.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute function on.</description>

</param>

<return type="function">

<description>Event handler function the same as the input function.</description>

</return>

</method>

<method name="getXY" summary="Returns the absolute X, Y cordinate of the element.">

<description>Returns the absolute X, Y cordinate of the element.

</description>

<return type="Object">

<description>Objext with x, y cordinate fields.</description>

</return>

</method>

<method name="getSize" summary="Returns the size of the element by a object with w and h fields.">

<description>Returns the size of the element by a object with w and h fields.

</description>

<return type="Object">

<description>Object with element size with a w and h field.</description>

</return>

</method>

<method name="moveTo" summary="Moves the element to a specific absolute position.">

<description>Moves the element to a specific absolute position.

</description>

<param name="x" type="Number">

<description>X cordinate of element position.</description>

</param>

<param name="y" type="Number">

<description>Y cordinate of element position.</description>

</param>

</method>

<method name="moveBy" summary="Moves the element relative to the current position.">

<description>Moves the element relative to the current position.

</description>

<param name="x" type="Number">

<description>Relative X cordinate of element position.</description>

</param>

<param name="y" type="Number">

<description>Relative Y cordinate of element position.</description>

</param>

</method>

<method name="resizeTo" summary="Resizes the element to a specific size.">

<description>Resizes the element to a specific size.

</description>

<param name="w" type="Number">

<description>New width of element.</description>

</param>

<param name="h" type="Numner">

<description>New height of element.</description>

</param>

</method>

<method name="resizeBy" summary="Resizes the element relative to the current sizeto a specific size.">

<description>Resizes the element relative to the current sizeto a specific size.

</description>

<param name="w" type="Number">

<description>Relative width of element.</description>

</param>

<param name="h" type="Numner">

<description>Relative height of element.</description>

</param>

</method>

<method name="update" summary="Updates the element blocker in IE6 based on the style information of the element.">

<description>Updates the element blocker in IE6 based on the style information of the element.

</description>

<param name="k" type="String">

<description>Optional function key. Used internally.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.dom.EventUtils" name="EventUtils" summary="This class handles DOM events in a cross platform fasion it also keeps track of element and handler references to be abl...">

<description>This class handles DOM events in a cross platform fasion it also keeps track of element

and handler references to be able to clean elements to reduce IE memory leaks.

</description>

<members>

<method constructor="true" name="EventUtils" summary="Constructs a new EventUtils instance.">

<description>Constructs a new EventUtils instance.

</description>

</method>

<method name="add" summary="Adds an event handler to the specified object.">

<description>Adds an event handler to the specified object.

</description>

<param name="o">

<type fullname="Element"/>

<type fullname="Document"/>

<type fullname="Window"/>

<type fullname="Array"/>

<type fullname="String"/>

<description>Object or element id string to add event handler to or an array of elements/ids/documents.</description>

</param>

<param name="n">

<type fullname="String"/>

<type fullname="Array"/>

<description>Name of event handler to add for example: click.</description>

</param>

<param name="f" type="function">

<description>Function to execute when the event occurs.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

<return type="function">

<description>Function callback handler the same as the one passed in.</description>

</return>

<example>// Adds a click handler to the current document

tinymce.dom.Event.add(document, 'click', function(e) {

   console.debug(e.target);

});</example>

</method>

<method name="remove" summary="Removes the specified event handler by name and function from a element or collection of elements.">

<description>Removes the specified event handler by name and function from a element or collection of elements.

</description>

<param name="o">

<type fullname="String"/>

<type fullname="Element"/>

<type fullname="Array"/>

<description>Element ID string or HTML element or an array of elements or ids to remove handler from.</description>

</param>

<param name="n" type="String">

<description>Event handler name like for example: "click"</description>

</param>

<param name="f" type="function">

<description>Function to remove.</description>

</param>

<return>

<type fullname="bool"/>

<type fullname="Array"/>

<description>Bool state if true if the handler was removed or an array with states if multiple elements where passed in.</description>

</return>

<example>// Adds a click handler to the current document

var func = tinymce.dom.Event.add(document, 'click', function(e) {

   console.debug(e.target);

});



// Removes the click handler from the document

tinymce.dom.Event.remove(document, 'click', func);</example>

</method>

<method name="clear" summary="Clears all events of a specific object.">

<description>Clears all events of a specific object.

</description>

<param name="o" type="Object">

<description>DOM element or object to remove all events from.</description>

</param>

<example>// Cancels all mousedown events in the active editor

tinyMCE.activeEditor.onMouseDown.add(function(ed, e) {

   return tinymce.dom.Event.cancel(e);

});</example>

</method>

<method name="cancel" summary="Cancels an event for both bubbeling and the default browser behavior.">

<description>Cancels an event for both bubbeling and the default browser behavior.

</description>

<param name="e" type="Event">

<description>Event object to cancel.</description>

</param>

<return type="Boolean">

<description>Always false.</description>

</return>

</method>

<method name="stop" summary="Stops propogation/bubbeling of an event.">

<description>Stops propogation/bubbeling of an event.

</description>

<param name="e" type="Event">

<description>Event to cancel bubbeling on.</description>

</param>

<return type="Boolean">

<description>Always false.</description>

</return>

</method>

<method name="prevent" summary="Prevent default browser behvaior of an event.">

<description>Prevent default browser behvaior of an event.

</description>

<param name="e" type="Event">

<description>Event to prevent default browser behvaior of an event.</description>

</param>

<return type="Boolean">

<description>Always false.</description>

</return>

</method>

<method name="destroy" summary="Destroys the instance.">

<description>Destroys the instance.

</description>

</method>

</members>

</class>

<class fullname="tinymce.dom.ScriptLoader" name="ScriptLoader" summary="This class handles asynchronous/synchronous loading of JavaScript files it will execute callbacks when various items get...">

<description>This class handles asynchronous/synchronous loading of JavaScript files it will execute callbacks when various items gets loaded. This class is useful to load external JavaScript files.

</description>

<example>// Load a script from a specific URL using the global script loader

tinymce.ScriptLoader.load('somescript.js');



// Load a script using a unique instance of the script loader

var scriptLoader = new tinymce.dom.ScriptLoader();



scriptLoader.load('somescript.js');



// Load multiple scripts

var scriptLoader = new tinymce.dom.ScriptLoader();



scriptLoader.add('somescript1.js');

scriptLoader.add('somescript2.js');

scriptLoader.add('somescript3.js');



scriptLoader.loadQueue(function() {

   alert('All scripts are now loaded.');

});</example>

<members>

<method name="load" summary="Loads a specific script directly without adding it to the load queue.">

<description>Loads a specific script directly without adding it to the load queue.

</description>

<param name="url" type="String">

<description>Absolute URL to script to add.</description>

</param>

<param name="callback" type="function">

<description>Optional callback function to execute ones this script gets loaded.</description>

</param>

<param name="scope" type="Object">

<description>Optional scope to execute callback in.</description>

</param>

</method>

<method name="isDone" summary="Returns true/false if a script has been loaded or not.">

<description>Returns true/false if a script has been loaded or not.

</description>

<param name="url" type="String">

<description>URL to check for.</description>

</param>

<return type="Object">

<description>[Boolean} true/false if the URL is loaded.</description>

</return>

</method>

<method name="markDone" summary="Marks a specific script to be loaded.">

<description>Marks a specific script to be loaded. This can be useful if a script got loaded outside

the script loader or to skip it from loading some script.

</description>

<param name="u" type="string">

<description>Absolute URL to the script to mark as loaded.</description>

</param>

</method>

<method name="add" summary="Adds a specific script to the load queue of the script loader.">

<description>Adds a specific script to the load queue of the script loader.

</description>

<param name="url" type="String">

<description>Absolute URL to script to add.</description>

</param>

<param name="callback" type="function">

<description>Optional callback function to execute ones this script gets loaded.</description>

</param>

<param name="scope" type="Object">

<description>Optional scope to execute callback in.</description>

</param>

</method>

<method name="loadQueue" summary="Starts the loading of the queue.">

<description>Starts the loading of the queue.

</description>

<param name="callback" type="function">

<description>Optional callback to execute when all queued items are loaded.</description>

</param>

<param name="scope" type="Object">

<description>Optional scope to execute the callback in.</description>

</param>

</method>

<method name="loadScripts" summary="Loads the specified queue of files and executes the callback ones they are loaded.">

<description>Loads the specified queue of files and executes the callback ones they are loaded.

This method is generally not used outside this class but it might be useful in some scenarios.

</description>

<param name="scripts" type="Array">

<description>Array of queue items to load.</description>

</param>

<param name="callback" type="function">

<description>Optional callback to execute ones all items are loaded.</description>

</param>

<param name="scope" type="Object">

<description>Optional scope to execute callback in.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.dom.Selection" name="Selection" summary="This class handles text and control selection it's an crossbrowser utility class.">

<description>This class handles text and control selection it's an crossbrowser utility class.

Consult the TinyMCE Wiki API for more details and examples on how to use this class.

</description>

<example>// Getting the currently selected node for the active editor

alert(tinymce.activeEditor.selection.getNode().nodeName);</example>

<members>

<method constructor="true" name="Selection" summary="Constructs a new selection instance.">

<description>Constructs a new selection instance.

</description>

<param name="dom" type="tinymce.dom.DOMUtils">

<description>DOMUtils object reference.</description>

</param>

<param name="win" type="Window">

<description>Window to bind the selection object to.</description>

</param>

<param name="serializer" type="tinymce.dom.Serializer">

<description>DOM serialization class to use for getContent.</description>

</param>

</method>

<event name="onBeforeSetContent" summary="This event gets executed before contents is extracted from the selection.">

<description>This event gets executed before contents is extracted from the selection.

</description>

<param name="selection" type="tinymce.dom.Selection">

<description>Selection object that fired the event.</description>

</param>

<param name="args" type="Object">

<description>Contains things like the contents that will be returned.</description>

</param>

</event>

<event name="onBeforeGetContent" summary="This event gets executed before contents is inserted into selection.">

<description>This event gets executed before contents is inserted into selection.

</description>

<param name="selection" type="tinymce.dom.Selection">

<description>Selection object that fired the event.</description>

</param>

<param name="args" type="Object">

<description>Contains things like the contents that will be inserted.</description>

</param>

</event>

<event name="onSetContent" summary="This event gets executed when contents is inserted into selection.">

<description>This event gets executed when contents is inserted into selection.

</description>

<param name="selection" type="tinymce.dom.Selection">

<description>Selection object that fired the event.</description>

</param>

<param name="args" type="Object">

<description>Contains things like the contents that will be inserted.</description>

</param>

</event>

<event name="onGetContent" summary="This event gets executed when contents is extracted from the selection.">

<description>This event gets executed when contents is extracted from the selection.

</description>

<param name="selection" type="tinymce.dom.Selection">

<description>Selection object that fired the event.</description>

</param>

<param name="args" type="Object">

<description>Contains things like the contents that will be returned.</description>

</param>

</event>

<method name="getContent" summary="Returns the selected contents using the DOM serializer passed in to this class.">

<description>Returns the selected contents using the DOM serializer passed in to this class.

</description>

<param name="s" type="Object">

<description>Optional settings class with for example output format text or html.</description>

</param>

<return type="String">

<description>Selected contents in for example HTML format.</description>

</return>

<example>// Alerts the currently selected contents

alert(tinyMCE.activeEditor.selection.getContent());



// Alerts the currently selected contents as plain text

alert(tinyMCE.activeEditor.selection.getContent({format : 'text'}));</example>

</method>

<method name="setContent" summary="Sets the current selection to the specified content.">

<description>Sets the current selection to the specified content. If any contents is selected it will be replaced

with the contents passed in to this function. If there is no selection the contents will be inserted

where the caret is placed in the editor/page.

</description>

<param name="content" type="String">

<description>HTML contents to set could also be other formats depending on settings.</description>

</param>

<param name="args" type="Object">

<description>Optional settings object with for example data format.</description>

</param>

<example>// Inserts some HTML contents at the current selection

tinyMCE.activeEditor.selection.setContent('&lt;strong&gt;Some contents&lt;/strong&gt;');</example>

</method>

<method name="getStart" summary="Returns the start element of a selection range.">

<description>Returns the start element of a selection range. If the start is in a text

node the parent element will be returned.

</description>

<return type="Element">

<description>Start element of selection range.</description>

</return>

</method>

<method name="getEnd" summary="Returns the end element of a selection range.">

<description>Returns the end element of a selection range. If the end is in a text

node the parent element will be returned.

</description>

<return type="Element">

<description>End element of selection range.</description>

</return>

</method>

<method name="getBookmark" summary="Returns a bookmark location for the current selection.">

<description>Returns a bookmark location for the current selection. This bookmark object

can then be used to restore the selection after some content modification to the document.

</description>

<param name="type" type="Number">

<description>Optional state if the bookmark should be simple or not. Default is complex.</description>

</param>

<param name="normalized" type="Boolean">

<description>Optional state that enables you to get a position that it would be after normalization.</description>

</param>

<return type="Object">

<description>Bookmark object, use moveToBookmark with this object to restore the selection.</description>

</return>

<example>// Stores a bookmark of the current selection

var bm = tinyMCE.activeEditor.selection.getBookmark();



tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + 'Some new content');



// Restore the selection bookmark

tinyMCE.activeEditor.selection.moveToBookmark(bm);</example>

</method>

<method name="moveToBookmark" summary="Restores the selection to the specified bookmark.">

<description>Restores the selection to the specified bookmark.

</description>

<param name="bookmark" type="Object">

<description>Bookmark to restore selection from.</description>

</param>

<return type="Boolean">

<description>true/false if it was successful or not.</description>

</return>

<example>// Stores a bookmark of the current selection

var bm = tinyMCE.activeEditor.selection.getBookmark();



tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + 'Some new content');



// Restore the selection bookmark

tinyMCE.activeEditor.selection.moveToBookmark(bm);</example>

</method>

<method name="select" summary="Selects the specified element.">

<description>Selects the specified element. This will place the start and end of the selection range around the element.

</description>

<param name="node" type="Element">

<description>HMTL DOM element to select.</description>

</param>

<param name="content" type="Boolean">

<description>Optional bool state if the contents should be selected or not on non IE browser.</description>

</param>

<return type="Element">

<description>Selected element the same element as the one that got passed in.</description>

</return>

<example>// Select the first paragraph in the active editor

tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]);</example>

</method>

<method name="isCollapsed" summary="Returns true/false if the selection range is collapsed or not.">

<description>Returns true/false if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection.

</description>

<return type="Boolean">

<description>true/false state if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection.</description>

</return>

</method>

<method name="collapse" summary="Collapse the selection to start or end of range.">

<description>Collapse the selection to start or end of range.

</description>

<param name="to_start" type="Boolean">

<description>Optional boolean state if to collapse to end or not. Defaults to start.</description>

</param>

</method>

<method name="getSel" summary="Returns the browsers internal selection object.">

<description>Returns the browsers internal selection object.

</description>

<return type="Selection">

<description>Internal browser selection object.</description>

</return>

</method>

<method name="getRng" summary="Returns the browsers internal range object.">

<description>Returns the browsers internal range object.

</description>

<param name="w3c" type="Boolean">

<description>Forces a compatible W3C range on IE.</description>

</param>

<return type="Range">

<description>Internal browser range object.</description>

</return>

<see class="http://www.quirksmode.org/dom/range_intro.html"/>

<see class="http://www.dotvoid.com/2001/03/using-the-range-object-in-mozilla"/>

</method>

<method name="setRng" summary="Changes the selection to the specified DOM range.">

<description>Changes the selection to the specified DOM range.

</description>

<param name="r" type="Range">

<description>Range to select.</description>

</param>

</method>

<method name="setNode" summary="Sets the current selection to the specified DOM element.">

<description>Sets the current selection to the specified DOM element.

</description>

<param name="n" type="Element">

<description>Element to set as the contents of the selection.</description>

</param>

<return type="Element">

<description>Returns the element that got passed in.</description>

</return>

<example>// Inserts a DOM node at current selection/caret location

tinyMCE.activeEditor.selection.setNode(tinyMCE.activeEditor.dom.create('img', {src : 'some.gif', title : 'some title'}));</example>

</method>

<method name="getNode" summary="Returns the currently selected element or the common ancestor element for both start and end of the selection.">

<description>Returns the currently selected element or the common ancestor element for both start and end of the selection.

</description>

<return type="Element">

<description>Currently selected element or common ancestor element.</description>

</return>

<example>// Alerts the currently selected elements node name

alert(tinyMCE.activeEditor.selection.getNode().nodeName);</example>

</method>

</members>

</class>

<class fullname="tinymce.dom.Serializer" name="Serializer" summary="This class is used to serialize DOM trees into a string.">

<description>This class is used to serialize DOM trees into a string. Consult the TinyMCE Wiki API for more details and examples on how to use this class.

</description>

<members>

<method constructor="true" name="Serializer" summary="Constucts a new DOM serializer class.">

<description>Constucts a new DOM serializer class.

</description>

<param name="settings" type="Object">

<description>Serializer settings object.</description>

</param>

<param name="dom" type="tinymce.dom.DOMUtils">

<description>DOMUtils instance reference.</description>

</param>

<param name="schema" type="tinymce.html.Schema">

<description>Optional schema reference.</description>

</param>

</method>

<event name="onPreProcess" summary="This event gets executed before a HTML fragment gets serialized into a HTML string.">

<description>This event gets executed before a HTML fragment gets serialized into a HTML string. This event enables you to do modifications to the DOM before the serialization occurs. It's important to know that the element that is getting serialized is cloned so it's not inside a document.

</description>

<param name="sender" type="tinymce.dom.Serializer">

<description>object/Serializer instance that is serializing an element.</description>

</param>

<param name="args" type="Object">

<description>Object containing things like the current node.</description>

</param>

<example>// Adds an observer to the onPreProcess event

serializer.onPreProcess.add(function(se, o) {

    // Add a class to each paragraph

    se.dom.addClass(se.dom.select('p', o.node), 'myclass');

});</example>

</event>

<event name="onPreProcess" summary="This event gets executed after a HTML fragment has been serialized into a HTML string.">

<description>This event gets executed after a HTML fragment has been serialized into a HTML string. This event enables you to do modifications to the HTML string like regexp replaces etc.

</description>

<param name="sender" type="tinymce.dom.Serializer">

<description>object/Serializer instance that is serializing an element.</description>

</param>

<param name="args" type="Object">

<description>Object containing things like the current contents.</description>

</param>

<example>// Adds an observer to the onPostProcess event

serializer.onPostProcess.add(function(se, o) {

   // Remove all paragraphs and replace with BR

   o.content = o.content.replace(/&lt;p[^&gt;]+&gt;|&lt;p&gt;/g, '');

   o.content = o.content.replace(/&lt;\/p&gt;/g, '&lt;br /&gt;');

});</example>

</event>

<method name="addNodeFilter" summary="Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name an...">

<description>Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name

and then execute the callback ones it has finished parsing the document.

</description>

<param name="callback" type="function">

<description>Callback function to execute once it has collected nodes.</description>

</param>

<example>parser.addNodeFilter('p,h1', function(nodes, name) {

	for (var i = 0; i &lt; nodes.length; i++) {

		console.log(nodes[i].name);

	}

});</example>

</method>

<method name="addAttributeFilter" summary="Adds a attribute filter function to the parser used by the serializer, the parser will collect nodes that has the specif...">

<description>Adds a attribute filter function to the parser used by the serializer, the parser will collect nodes that has the specified attributes

and then execute the callback ones it has finished parsing the document.

</description>

<param name="callback" type="function">

<description>Callback function to execute once it has collected nodes.</description>

</param>

<example>parser.addAttributeFilter('src,href', function(nodes, name) {

	for (var i = 0; i &lt; nodes.length; i++) {

		console.log(nodes[i].name);

	}

});</example>

</method>

<event name="onPreProcess" summary="Fires when the Serializer does a preProcess on the contents.">

<description>Fires when the Serializer does a preProcess on the contents.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="obj" type="Object">

<description>PreProcess object.</description>

<option name="node" type="Node">

<description>DOM node for the item being serialized.</description>

</option>

<option name="format" type="String">

<description>The specified output format normally "html".</description>

</option>

<option name="get" type="Boolean">

<description>Is true if the process is on a getContent operation.</description>

</option>

<option name="set" type="Boolean">

<description>Is true if the process is on a setContent operation.</description>

</option>

<option name="cleanup" type="Boolean">

<description>Is true if the process is on a cleanup operation.</description>

</option>

</param>

</event>

<event name="onPostProcess" summary="Fires when the Serializer does a postProcess on the contents.">

<description>Fires when the Serializer does a postProcess on the contents.

</description>

<param name="sender" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<param name="obj" type="Object">

<description>PreProcess object.</description>

</param>

</event>

<method name="serialize" summary="Serializes the specified browser DOM node into a HTML string.">

<description>Serializes the specified browser DOM node into a HTML string.

</description>

<param name="node" type="DOMNode">

<description>DOM node to serialize.</description>

</param>

<param name="args" type="Object">

<description>Arguments option that gets passed to event handlers.</description>

</param>

</method>

<method name="addRules" summary="Adds valid elements rules to the serializers schema instance this enables you to specify things like what elements shoul...">

<description>Adds valid elements rules to the serializers schema instance this enables you to specify things

like what elements should be outputted and what attributes specific elements might have.

Consult the Wiki for more details on this format.

</description>

<param name="rules" type="String">

<description>Valid elements rules string to add to schema.</description>

</param>

</method>

<method name="setRules" summary="Sets the valid elements rules to the serializers schema instance this enables you to specify things like what elements s...">

<description>Sets the valid elements rules to the serializers schema instance this enables you to specify things

like what elements should be outputted and what attributes specific elements might have.

Consult the Wiki for more details on this format.

</description>

<param name="rules" type="String">

<description>Valid elements rules string.</description>

</param>

</method>

</members>

</class>

<members>

<property fullname="tinymce.dom.Event" name="Event" summary="Instance of EventUtils for the current document." type="tinymce.dom.EventUtils">

<description>Instance of EventUtils for the current document.

</description>

</property>

</members>

</namespace>

<namespace fullname="tinymce.html" name="html">

<description>Contains html parser and serializer logic.</description>

<class fullname="tinymce.html.DomParser" name="DomParser" summary="This class parses HTML code into a DOM like structure of nodes it will remove redundant whitespace and make sure that th..." version="3.4">

<description>This class parses HTML code into a DOM like structure of nodes it will remove redundant whitespace and make

sure that the node tree is valid according to the specified schema. So for example: &lt;p&gt;a&lt;p&gt;b&lt;/p&gt;c&lt;/p&gt; will become &lt;p&gt;a&lt;/p&gt;&lt;p&gt;b&lt;/p&gt;&lt;p&gt;c&lt;/p&gt;

</description>

<example>var parser = new tinymce.html.DomParser({validate: true}, schema);

var rootNode = parser.parse('&lt;h1&gt;content&lt;/h1&gt;');</example>

<members>

<method constructor="true" name="DomParser" summary="Constructs a new DomParser instance.">

<description>Constructs a new DomParser instance.

</description>

<param name="settings" type="Object">

<description>Name/value collection of settings. comment, cdata, text, start and end are callbacks.</description>

</param>

<param name="schema" type="tinymce.html.Schema">

<description>HTML Schema class to use when parsing.</description>

</param>

</method>

<method name="addNodeFilter" summary="Adds a node filter function to the parser, the parser will collect the specified nodes by name and then execute the call...">

<description>Adds a node filter function to the parser, the parser will collect the specified nodes by name

and then execute the callback ones it has finished parsing the document.

</description>

<param name="callback" type="function">

<description>Callback function to execute once it has collected nodes.</description>

</param>

<example>parser.addNodeFilter('p,h1', function(nodes, name) {

	for (var i = 0; i &lt; nodes.length; i++) {

		console.log(nodes[i].name);

	}

});</example>

</method>

<method name="addAttributeFilter" summary="Adds a attribute filter function to the parser, the parser will collect nodes that has the specified attributes and then...">

<description>Adds a attribute filter function to the parser, the parser will collect nodes that has the specified attributes

and then execute the callback ones it has finished parsing the document.

</description>

<param name="callback" type="function">

<description>Callback function to execute once it has collected nodes.</description>

</param>

<example>parser.addAttributeFilter('src,href', function(nodes, name) {

	for (var i = 0; i &lt; nodes.length; i++) {

		console.log(nodes[i].name);

	}

});</example>

</method>

<method name="parse" summary="Parses the specified HTML string into a DOM like node tree and returns the result.">

<description>Parses the specified HTML string into a DOM like node tree and returns the result.

</description>

<param name="html" type="String">

<description>Html string to sax parse.</description>

</param>

<param name="args" type="Object">

<description>Optional args object that gets passed to all filter functions.</description>

</param>

<return type="tinymce.html.Node">

<description>Root node containing the tree.</description>

</return>

<example>var rootNode = new DomParser({...}).parse('&lt;b&gt;text&lt;/b&gt;');</example>

</method>

</members>

</class>

<class fullname="tinymce.html.SaxParser" name="SaxParser" static="true" summary="This class parses HTML code using pure JavaScript and executes various events for each item it finds." version="3.4">

<description>Entity encoder class.

</description>

<members>

<method name="encodeRaw" static="true" summary="Encodes the specified string using raw entities.">

<description>Encodes the specified string using raw entities. This means only the required XML base entities will be endoded.

</description>

<param name="text" type="String">

<description>Text to encode.</description>

</param>

<param name="attr" type="Boolean">

<description>Optional flag to specify if the text is attribute contents.</description>

</param>

<return type="String">

<description>Entity encoded text.</description>

</return>

</method>

<method name="encodeAllRaw" static="true" summary="Encoded the specified text with both the attributes and text entities.">

<description>Encoded the specified text with both the attributes and text entities. This function will produce larger text contents

since it doesn't know if the context is within a attribute or text node. This was added for compatibility

and is exposed as the DOMUtils.encode function.

</description>

<param name="text" type="String">

<description>Text to encode.</description>

</param>

<return type="String">

<description>Entity encoded text.</description>

</return>

</method>

<method name="encodeNumeric" static="true" summary="Encodes the specified string using numeric entities.">

<description>Encodes the specified string using numeric entities. The core entities will be encoded as named ones but all non lower ascii characters

will be encoded into numeric entities.

</description>

<param name="text" type="String">

<description>Text to encode.</description>

</param>

<param name="attr" type="Boolean">

<description>Optional flag to specify if the text is attribute contents.</description>

</param>

<return type="String">

<description>Entity encoded text.</description>

</return>

</method>

<method name="encodeNamed" static="true" summary="Encodes the specified string using named entities.">

<description>Encodes the specified string using named entities. The core entities will be encoded as named ones but all non lower ascii characters

will be encoded into named entities.

</description>

<param name="text" type="String">

<description>Text to encode.</description>

</param>

<param name="attr" type="Boolean">

<description>Optional flag to specify if the text is attribute contents.</description>

</param>

<param name="entities" type="Object">

<description>Optional parameter with entities to use.</description>

</param>

<return type="String">

<description>Entity encoded text.</description>

</return>

</method>

<method name="getEncodeFunc" static="true" summary="Returns an encode function based on the name(s) and it's optional entities.">

<description>Returns an encode function based on the name(s) and it's optional entities.

</description>

<param name="name" type="String">

<description>Comma separated list of encoders for example named,numeric.</description>

</param>

<param name="entities" type="String">

<description>Optional parameter with entities to use instead of the built in set.</description>

</param>

<return type="function">

<description>Encode function to be used.</description>

</return>

</method>

<method constructor="true" name="SaxParser" summary="Constructs a new SaxParser instance.">

<description>Constructs a new SaxParser instance.

</description>

<param name="settings" type="Object">

<description>Name/value collection of settings. comment, cdata, text, start and end are callbacks.</description>

</param>

<param name="schema" type="tinymce.html.Schema">

<description>HTML Schema class to use when parsing.</description>

</param>

</method>

<method name="parse" summary="Parses the specified HTML string and executes the callbacks for each item it finds.">

<description>Parses the specified HTML string and executes the callbacks for each item it finds.

</description>

<param name="html" type="String">

<description>Html string to sax parse.</description>

</param>

<example>new SaxParser({...}).parse('&lt;b&gt;text&lt;/b&gt;');</example>

</method>

</members>

<description>This class parses HTML code using pure JavaScript and executes various events for each item it finds. It will

always execute the events in the right order for tag soup code like &lt;b&gt;&lt;p&gt;&lt;/b&gt;&lt;/p&gt;. It will also remove elements

and attributes that doesn't fit the schema if the validate setting is enabled.

</description>

<example>var parser = new tinymce.html.SaxParser({

    validate: true,



    comment: function(text) {

        console.log('Comment:', text);

    },



    cdata: function(text) {

        console.log('CDATA:', text);

    },



    text: function(text, raw) {

        console.log('Text:', text, 'Raw:', raw);

    },



    start: function(name, attrs, empty) {

        console.log('Start:', name, attrs, empty);

    },



    end: function(name) {

        console.log('End:', name);

    },



    pi: function(name, text) {

        console.log('PI:', name, text);

    },



    doctype: function(text) {

        console.log('DocType:', text);

    }

}, schema);</example>

</class>

<class fullname="tinymce.html.Node" name="Node" summary="This class is a minimalistic implementation of a DOM like node used by the DomParser class." version="3.4">

<description>This class is a minimalistic implementation of a DOM like node used by the DomParser class.

</description>

<example>var node = new tinymce.html.Node('strong', 1);

someRoot.append(node);</example>

<members>

<method constructor="true" name="Node" summary="Constructs a new Node instance.">

<description>Constructs a new Node instance.

</description>

<param name="name" type="String">

<description>Name of the node type.</description>

</param>

<param name="type" type="Number">

<description>Numeric type representing the node.</description>

</param>

</method>

<method name="replace" summary="Replaces the current node with the specified one.">

<description>Replaces the current node with the specified one.

</description>

<param name="node" type="tinymce.html.Node">

<description>Node to replace the current node with.</description>

</param>

<return type="tinymce.html.Node">

<description>The old node that got replaced.</description>

</return>

<example>someNode.replace(someNewNode);</example>

</method>

<method name="attr" summary="Gets/sets or removes an attribute by name.">

<description>Gets/sets or removes an attribute by name.

</description>

<param name="name" type="String">

<description>Attribute name to set or get.</description>

</param>

<param name="value" type="String">

<description>Optional value to set.</description>

</param>

<return>

<type fullname="String"/>

<type fullname="tinymce.html.Node"/>

<description>String or undefined on a get operation or the current node on a set operation.</description>

</return>

<example>someNode.attr("name", "value"); // Sets an attribute

console.log(someNode.attr("name")); // Gets an attribute

someNode.attr("name", null); // Removes an attribute</example>

</method>

<method name="clone" summary="Does a shallow clones the node into a new node.">

<description>Does a shallow clones the node into a new node. It will also exclude id attributes since

there should only be one id per document.

</description>

<return type="tinymce.html.Node">

<description>New copy of the original node.</description>

</return>

<example>var clonedNode = node.clone();</example>

</method>

<method name="wrap" summary="Wraps the node in in another node.">

<description>Wraps the node in in another node.

</description>

<example>node.wrap(wrapperNode);</example>

</method>

<method name="unwrap" summary="Unwraps the node in other words it removes the node but keeps the children.">

<description>Unwraps the node in other words it removes the node but keeps the children.

</description>

<example>node.unwrap();</example>

</method>

<method name="remove" summary="Removes the node from it's parent.">

<description>Removes the node from it's parent.

</description>

<return type="tinymce.html.Node">

<description>Current node that got removed.</description>

</return>

<example>node.remove();</example>

</method>

<method name="append" summary="Appends a new node as a child of the current node.">

<description>Appends a new node as a child of the current node.

</description>

<param name="node" type="tinymce.html.Node">

<description>Node to append as a child of the current one.</description>

</param>

<return type="tinymce.html.Node">

<description>The node that got appended.</description>

</return>

<example>node.append(someNode);</example>

</method>

<method name="insert" summary="Inserts a node at a specific position as a child of the current node.">

<description>Inserts a node at a specific position as a child of the current node.

</description>

<param name="node" type="tinymce.html.Node">

<description>Node to insert as a child of the current node.</description>

</param>

<param name="ref_node" type="tinymce.html.Node">

<description>Reference node to set node before/after.</description>

</param>

<param name="before" type="Boolean">

<description>Optional state to insert the node before the reference node.</description>

</param>

<return type="tinymce.html.Node">

<description>The node that got inserted.</description>

</return>

<example>parentNode.insert(newChildNode, oldChildNode);</example>

</method>

<method name="getAll" summary="Get all children by name.">

<description>Get all children by name.

</description>

<param name="name" type="String">

<description>Name of the child nodes to collect.</description>

</param>

<return type="Array">

<description>Array with child nodes matchin the specified name.</description>

</return>

</method>

<method name="empty" summary="Removes all children of the current node.">

<description>Removes all children of the current node.

</description>

<return type="tinymce.html.Node">

<description>The current node that got cleared.</description>

</return>

</method>

<method name="isEmpty" summary="Returns true/false if the node is to be considered empty or not.">

<description>Returns true/false if the node is to be considered empty or not.

</description>

<param name="elements" type="Object">

<description>Name/value object with elements that are automatically treated as non empty elements.</description>

</param>

<return type="Boolean">

<description>true/false if the node is empty or not.</description>

</return>

<example>node.isEmpty({img : true});</example>

</method>

<method name="walk" summary="Walks to the next or previous node and returns that node or null if it wasn't found.">

<description>Walks to the next or previous node and returns that node or null if it wasn't found.

</description>

<param name="prev" type="Boolean">

<description>Optional previous node state defaults to false.</description>

</param>

<return type="tinymce.html.Node">

<description>Node that is next to or previous of the current node.</description>

</return>

</method>

<method name="create" static="true" summary="Creates a node of a specific type.">

<description>Creates a node of a specific type.

</description>

<param name="name" type="String">

<description>Name of the node type to create for example "b" or "#text".</description>

</param>

<param name="attrs" type="Object">

<description>Name/value collection of attributes that will be applied to elements.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.html.Schema" name="Schema" summary="Schema validator class." version="3.4">

<description>Schema validator class.

</description>

<example>if (tinymce.activeEditor.schema.isValidChild('p', 'span'))

   alert('span is valid child of p.');



 if (tinymce.activeEditor.schema.getElementRule('p'))

   alert('P is a valid element.');</example>

<members>

<method constructor="true" name="Schema" summary="Constructs a new Schema instance.">

<description>Constructs a new Schema instance.

</description>

<param name="settings" type="Object">

<description>Name/value settings object.</description>

</param>

</method>

<method name="getBoolAttrs" summary="Returns a map with boolean attributes.">

<description>Returns a map with boolean attributes.

</description>

<return type="Object">

<description>Name/value lookup map for boolean attributes.</description>

</return>

</method>

<method name="getBoolAttrs" summary="Returns a map with block elements.">

<description>Returns a map with block elements.

</description>

<return type="Object">

<description>Name/value lookup map for block elements.</description>

</return>

</method>

<method name="getShortEndedElements" summary="Returns a map with short ended elements such as BR or IMG.">

<description>Returns a map with short ended elements such as BR or IMG.

</description>

<return type="Object">

<description>Name/value lookup map for short ended elements.</description>

</return>

</method>

<method name="getSelfClosingElements" summary="Returns a map with self closing tags such as .">

<description>Returns a map with self closing tags such as &lt;li&gt;.

</description>

<return type="Object">

<description>Name/value lookup map for self closing tags elements.</description>

</return>

</method>

<method name="getNonEmptyElements" summary="Returns a map with elements that should be treated as contents regardless if it has text content in them or not such as ...">

<description>Returns a map with elements that should be treated as contents regardless if it has text

content in them or not such as TD, VIDEO or IMG.

</description>

<return type="Object">

<description>Name/value lookup map for non empty elements.</description>

</return>

</method>

<method name="getWhiteSpaceElements" summary="Returns a map with elements where white space is to be preserved like PRE or SCRIPT.">

<description>Returns a map with elements where white space is to be preserved like PRE or SCRIPT.

</description>

<return type="Object">

<description>Name/value lookup map for white space elements.</description>

</return>

</method>

<method name="isValidChild" summary="Returns true/false if the specified element and it's child is valid or not according to the schema.">

<description>Returns true/false if the specified element and it's child is valid or not

according to the schema.

</description>

<param name="name" type="String">

<description>Element name to check for.</description>

</param>

<param name="child" type="String">

<description>Element child to verify.</description>

</param>

<return type="Boolean">

<description>True/false if the element is a valid child of the specified parent.</description>

</return>

</method>

<method name="getElementRule" summary="Returns true/false if the specified element is valid or not according to the schema.">

<description>Returns true/false if the specified element is valid or not

according to the schema.

</description>

<param name="name" type="String">

<description>Element name to check for.</description>

</param>

<return type="Object">

<description>Element object or undefined if the element isn't valid.</description>

</return>

</method>

<method name="getCustomElements" summary="Returns an map object of all custom elements.">

<description>Returns an map object of all custom elements.

</description>

<return type="Object">

<description>Name/value map object of all custom elements.</description>

</return>

</method>

<method name="addValidElements" summary="Parses a valid elements string and adds it to the schema.">

<description>Parses a valid elements string and adds it to the schema. The valid elements format is for example "element[attr=default|otherattr]".

Existing rules will be replaced with the ones specified, so this extends the schema.

</description>

<param name="valid_elements" type="String">

<description>String in the valid elements format to be parsed.</description>

</param>

</method>

<method name="setValidElements" summary="Parses a valid elements string and sets it to the schema.">

<description>Parses a valid elements string and sets it to the schema. The valid elements format is for example "element[attr=default|otherattr]".

Existing rules will be replaced with the ones specified, so this extends the schema.

</description>

<param name="valid_elements" type="String">

<description>String in the valid elements format to be parsed.</description>

</param>

</method>

<method name="addCustomElements" summary="Adds custom non HTML elements to the schema.">

<description>Adds custom non HTML elements to the schema.

</description>

<param name="custom_elements" type="String">

<description>Comma separated list of custom elements to add.</description>

</param>

</method>

<method name="addValidChildren" summary="Parses a valid children string and adds them to the schema structure.">

<description>Parses a valid children string and adds them to the schema structure. The valid children format is for example: "element[child1|child2]".

</description>

<param name="valid_children" type="String">

<description>Valid children elements string to parse</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.html.Serializer" name="Serializer" summary="This class is used to serialize down the DOM tree into a string using a Writer instance." version="3.4">

<description>This class is used to serialize down the DOM tree into a string using a Writer instance.



</description>

<example>new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('&lt;p&gt;text&lt;/p&gt;'));</example>

<members>

<method constructor="true" name="Serializer" summary="Constructs a new Serializer instance.">

<description>Constructs a new Serializer instance.

</description>

<param name="settings" type="Object">

<description>Name/value settings object.</description>

</param>

<param name="schema" type="tinymce.html.Schema">

<description>Schema instance to use.</description>

</param>

</method>

<method name="serialize" summary="Serializes the specified node into a string.">

<description>Serializes the specified node into a string.

</description>

<param name="node" type="tinymce.html.Node">

<description>Node instance to serialize.</description>

</param>

<return type="String">

<description>String with HTML based on DOM tree.</description>

</return>

<example>new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('&lt;p&gt;text&lt;/p&gt;'));</example>

</method>

</members>

</class>

<class fullname="tinymce.html.Styles" name="Styles" summary="This class is used to parse CSS styles it also compresses styles to reduce the output size." version="3.4">

<description>This class is used to parse CSS styles it also compresses styles to reduce the output size.

</description>

<example>var Styles = new tinymce.html.Styles({

   url_converter: function(url) {

      return url;

   }

});



styles = Styles.parse('border: 1px solid red');

styles.color = 'red';



console.log(new tinymce.html.StyleSerializer().serialize(styles));</example>

<members>

<method name="toHex" summary="Parses the specified RGB color value and returns a hex version of that color.">

<description>Parses the specified RGB color value and returns a hex version of that color.

</description>

<param name="color" type="String">

<description>RGB string value like rgb(1,2,3)</description>

</param>

<return type="String">

<description>Hex version of that RGB value like #FF00FF.</description>

</return>

</method>

<method name="parse" summary="Parses the specified style value into an object collection.">

<description>Parses the specified style value into an object collection. This parser will also

merge and remove any redundant items that browsers might have added. It will also convert non hex

colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.

</description>

<param name="css" type="String">

<description>Style value to parse for example: border:1px solid red;.</description>

</param>

<return type="Object">

<description>Object representation of that style like {border : '1px solid red'}</description>

</return>

</method>

<method name="serialize" summary="Serializes the specified style object into a string.">

<description>Serializes the specified style object into a string.

</description>

<param name="styles" type="Object">

<description>Object to serialize as string for example: {border : '1px solid red'}</description>

</param>

<param name="element_name" type="String">

<description>Optional element name, if specified only the styles that matches the schema will be serialized.</description>

</param>

<return type="String">

<description>String representation of the style object for example: border: 1px solid red.</description>

</return>

</method>

</members>

</class>

<class fullname="tinymce.html.Writer" name="Writer" summary="This class is used to write HTML tags out it can be used with the Serializer or the SaxParser." version="3.4">

<description>This class is used to write HTML tags out it can be used with the Serializer or the SaxParser.

</description>

<example>var writer = new tinymce.html.Writer({indent : true});

var parser = new tinymce.html.SaxParser(writer).parse('&lt;p&gt;&lt;br&gt;&lt;/p&gt;');

console.log(writer.getContent());</example>

<members>

<method constructor="true" name="Writer" summary="Constructs a new Writer instance.">

<description>Constructs a new Writer instance.

</description>

<param name="settings" type="Object">

<description>Name/value settings object.</description>

</param>

</method>

<method name="start" summary="Writes the a start element such as .">

<description>Writes the a start element such as &lt;p id="a"&gt;.

</description>

<param name="name" type="String">

<description>Name of the element.</description>

</param>

<param name="attrs" type="Array">

<description>Optional attribute array or undefined if it hasn't any.</description>

</param>

<param name="empty" type="Boolean">

<description>Optional empty state if the tag should end like &lt;br /&gt;.</description>

</param>

</method>

<method name="end" summary="Writes the a end element such as .">

<description>Writes the a end element such as &lt;/p&gt;.

</description>

<param name="name" type="String">

<description>Name of the element.</description>

</param>

</method>

<method name="text" summary="Writes a text node.">

<description>Writes a text node.

</description>

<param name="text" type="String">

<description>String to write out.</description>

</param>

<param name="raw" type="Boolean">

<description>Optional raw state if true the contents wont get encoded.</description>

</param>

</method>

<method name="cdata" summary="Writes a cdata node such as .">

<description>Writes a cdata node such as &lt;![CDATA[data]]&gt;.

</description>

<param name="text" type="String">

<description>String to write out inside the cdata.</description>

</param>

</method>

<method name="cdata" summary="Writes a comment node such as .">

<description>Writes a comment node such as &lt;!-- Comment --&gt;.

</description>

<param name="text" type="String">

<description>String to write out inside the comment.</description>

</param>

</method>

<method name="pi" summary="Writes a PI node such as .">

<description>Writes a PI node such as &lt;?xml attr="value" ?&gt;.

</description>

<param name="name" type="String">

<description>Name of the pi.</description>

</param>

<param name="text" type="String">

<description>String to write out inside the pi.</description>

</param>

</method>

<method name="doctype" summary="Writes a doctype node such as .">

<description>Writes a doctype node such as &lt;!DOCTYPE data&gt;.

</description>

<param name="text" type="String">

<description>String to write out inside the doctype.</description>

</param>

</method>

<method name="reset" summary="Resets the internal buffer if one wants to reuse the writer.">

<description>Resets the internal buffer if one wants to reuse the writer.

</description>

</method>

<method name="getContent" summary="Returns the contents that got serialized.">

<description>Returns the contents that got serialized.

</description>

<return type="String">

<description>HTML contents that got written down.</description>

</return>

</method>

</members>

</class>

</namespace>

<namespace fullname="tinymce.ui" name="ui">

<description>Contains the different UI types such as buttons, listboxes etc.</description>

<class extends="tinymce.ui.Control" fullname="tinymce.ui.Button" name="Button" summary="This class is used to create a UI button.">

<description>This class is used to create a UI button. A button is basically a link

that is styled to look like a button or icon.

</description>

<members>

<method constructor="true" name="Button" summary="Constructs a new button control instance.">

<description>Constructs a new button control instance.

</description>

<param name="id" type="String">

<description>Control id for the button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

<param name="ed" type="Editor">

<description>Optional the editor instance this button is for.</description>

</param>

</method>

<method name="renderHTML" summary="Renders the button as a HTML string.">

<description>Renders the button as a HTML string. This method is much faster than using the DOM and when

creating a whole toolbar with buttons it does make a lot of difference.

</description>

<return type="String">

<description>HTML for the button control element.</description>

</return>

</method>

<method name="postRender" summary="Post render handler.">

<description>Post render handler. This function will be called after the UI has been

rendered so that events can be added.

</description>

</method>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.SplitButton" fullname="tinymce.ui.ColorSplitButton" name="ColorSplitButton" summary="This class is used to create UI color split button.">

<description>This class is used to create UI color split button. A color split button will present show a small color picker

when you press the open menu.

</description>

<members>

<method constructor="true" name="ColorSplitButton" summary="Constructs a new color split button control instance.">

<description>Constructs a new color split button control instance.

</description>

<param name="id" type="String">

<description>Control id for the color split button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

<param name="ed" type="Editor">

<description>The editor instance this button is for.</description>

</param>

</method>

<property name="settings" summary="Settings object." type="Object">

<description>Settings object.

</description>

</property>

<event name="onShowMenu" summary="Fires when the menu is shown.">

<description>Fires when the menu is shown.

</description>

</event>

<event name="onHideMenu" summary="Fires when the menu is hidden.">

<description>Fires when the menu is hidden.

</description>

</event>

<property name="value" summary="Current color value." type="String">

<description>Current color value.

</description>

</property>

<method name="showMenu" summary="Shows the color menu.">

<description>Shows the color menu. The color menu is a layer places under the button

and displays a table of colors for the user to pick from.

</description>

</method>

<method name="hideMenu" summary="Hides the color menu.">

<description>Hides the color menu. The optional event parameter is used to check where the event occured so it

doesn't close them menu if it was a event inside the menu.

</description>

<param name="e" type="Event">

<description>Optional event object.</description>

</param>

</method>

<method name="renderMenu" summary="Renders the menu to the DOM.">

<description>Renders the menu to the DOM.

</description>

</method>

<method name="setColor" summary="Sets the current color for the control and hides the menu if it should be visible.">

<description>Sets the current color for the control and hides the menu if it should be visible.

</description>

<param name="c" type="String">

<description>Color code value in hex for example: #FF00FF</description>

</param>

</method>

<method name="displayColor" summary="Change the currently selected color for the control.">

<description>Change the currently selected color for the control.

</description>

<param name="c" type="String">

<description>Color code value in hex for example: #FF00FF</description>

</param>

</method>

<method name="postRender" summary="Post render event.">

<description>Post render event. This will be executed after the control has been rendered and can be used to

set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent().

</description>

</method>

<method name="destroy" summary="Destroys the control.">

<description>Destroys the control. This means it will be removed from the DOM and any

events tied to it will also be removed.

</description>

</method>

<method inherited-from="tinymce.ui.SplitButton" name="renderHTML"/>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.SplitButton"/>

<class-ref class="tinymce.ui.Button"/>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.Control" fullname="tinymce.ui.Container" name="Container" summary="This class is the base class for all container controls like toolbars.">

<description>This class is the base class for all container controls like toolbars. This class should not

be instantiated directly other container controls should inherit from this one.

</description>

<members>

<method constructor="true" name="Container" summary="Base contrustor a new container control instance.">

<description>Base contrustor a new container control instance.

</description>

<param name="id" type="String">

<description>Control id to use for the container.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

</method>

<property name="controls" summary="Array of controls added to the container." type="Array">

<description>Array of controls added to the container.

</description>

</property>

<method name="add" summary="Adds a control to the collection of controls for the container.">

<description>Adds a control to the collection of controls for the container.

</description>

<param name="c" type="tinymce.ui.Control">

<description>Control instance to add to the container.</description>

</param>

<return type="tinymce.ui.Control">

<description>Same control instance that got passed in.</description>

</return>

</method>

<method name="get" summary="Returns a control by id from the containers collection.">

<description>Returns a control by id from the containers collection.

</description>

<param name="n" type="String">

<description>Id for the control to retrive.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance by the specified name or undefined if it wasn't found.</description>

</return>

</method>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderHTML"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="postRender"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class fullname="tinymce.ui.Control" name="Control" summary="This class is the base class for all controls like buttons, toolbars, containers.">

<description>This class is the base class for all controls like buttons, toolbars, containers. This class should not

be instantiated directly other controls should inherit from this one.

</description>

<members>

<method constructor="true" name="Control" summary="Constructs a new control instance.">

<description>Constructs a new control instance.

</description>

<param name="id" type="String">

<description>Control id.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

</method>

<method name="setDisabled" summary="Sets the disabled state for the control.">

<description>Sets the disabled state for the control. This will add CSS classes to the

element that contains the control. So that it can be disabled visually.

</description>

<param name="s" type="Boolean">

<description>Boolean state if the control should be disabled or not.</description>

</param>

</method>

<method name="isDisabled" summary="Returns true/false if the control is disabled or not.">

<description>Returns true/false if the control is disabled or not. This is a method since you can then

choose to check some class or some internal bool state in subclasses.

</description>

<return type="Boolean">

<description>true/false if the control is disabled or not.</description>

</return>

</method>

<method name="setActive" summary="Sets the activated state for the control.">

<description>Sets the activated state for the control. This will add CSS classes to the

element that contains the control. So that it can be activated visually.

</description>

<param name="s" type="Boolean">

<description>Boolean state if the control should be activated or not.</description>

</param>

</method>

<method name="isActive" summary="Returns true/false if the control is disabled or not.">

<description>Returns true/false if the control is disabled or not. This is a method since you can then

choose to check some class or some internal bool state in subclasses.

</description>

<return type="Boolean">

<description>true/false if the control is disabled or not.</description>

</return>

</method>

<method name="setState" summary="Sets the specified class state for the control.">

<description>Sets the specified class state for the control.

</description>

<param name="c" type="String">

<description>Class name to add/remove depending on state.</description>

</param>

<param name="s" type="Boolean">

<description>True/false state if the class should be removed or added.</description>

</param>

</method>

<method name="isRendered" summary="Returns true/false if the control has been rendered or not.">

<description>Returns true/false if the control has been rendered or not.

</description>

<return type="Boolean">

<description>State if the control has been rendered or not.</description>

</return>

</method>

<method name="renderHTML" summary="Renders the control as a HTML string.">

<description>Renders the control as a HTML string. This method is much faster than using the DOM and when

creating a whole toolbar with buttons it does make a lot of difference.

</description>

<return type="String">

<description>HTML for the button control element.</description>

</return>

</method>

<method name="renderTo" summary="Renders the control to the specified container element.">

<description>Renders the control to the specified container element.

</description>

<param name="n" type="Element">

<description>HTML DOM element to add control to.</description>

</param>

</method>

<method name="postRender" summary="Post render event.">

<description>Post render event. This will be executed after the control has been rendered and can be used to

set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent().

</description>

</method>

<method name="remove" summary="Removes the control.">

<description>Removes the control. This means it will be removed from the DOM and any

events tied to it will also be removed.

</description>

</method>

<method name="destroy" summary="Destroys the control will free any memory by removing event listeners etc.">

<description>Destroys the control will free any memory by removing event listeners etc.

</description>

</method>

</members>

</class>

<class extends="tinymce.ui.Menu" fullname="tinymce.ui.DropMenu" name="DropMenu" summary="This class is used to create drop menus, a drop menu can be a context menu, or a menu for a list box or a menu bar.">

<description>This class is used to create drop menus, a drop menu can be a

context menu, or a menu for a list box or a menu bar.

</description>

<members>

<method constructor="true" name="DropMenu" summary="Constructs a new drop menu control instance.">

<description>Constructs a new drop menu control instance.

</description>

<param name="id" type="String">

<description>Button control id for the button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

</method>

<method name="createMenu" summary="Created a new sub menu for the drop menu control.">

<description>Created a new sub menu for the drop menu control.

</description>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

<return type="tinymce.ui.DropMenu">

<description>New drop menu instance.</description>

</return>

</method>

<method name="update" summary="Repaints the menu after new items have been added dynamically.">

<description>Repaints the menu after new items have been added dynamically.

</description>

</method>

<method name="showMenu" summary="Displays the menu at the specified cordinate.">

<description>Displays the menu at the specified cordinate.

</description>

<param name="x" type="Number">

<description>Horizontal position of the menu.</description>

</param>

<param name="y" type="Number">

<description>Vertical position of the menu.</description>

</param>

<param name="px" type="Numner">

<description>Optional parent X position used when menus are cascading.</description>

</param>

</method>

<method name="hideMenu" summary="Hides the displayed menu.">

<description>Hides the displayed menu.

</description>

</method>

<method name="add" summary="Adds a new menu, menu item or sub classes of them to the drop menu.">

<description>Adds a new menu, menu item or sub classes of them to the drop menu.

</description>

<param name="o" type="tinymce.ui.Control">

<description>Menu or menu item to add to the drop menu.</description>

</param>

<return type="tinymce.ui.Control">

<description>Same as the input control, the menu or menu item.</description>

</return>

</method>

<method name="collapse" summary="Collapses the menu, this will hide the menu and all menu items.">

<description>Collapses the menu, this will hide the menu and all menu items.

</description>

<param name="d" type="Boolean">

<description>Optional deep state. If this is set to true all children will be collapsed as well.</description>

</param>

</method>

<method name="remove" summary="Removes a specific sub menu or menu item from the drop menu.">

<description>Removes a specific sub menu or menu item from the drop menu.

</description>

<param name="o" type="tinymce.ui.Control">

<description>Menu item or menu to remove from drop menu.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance or null if it wasn't found.</description>

</return>

</method>

<method name="destroy" summary="Destroys the menu.">

<description>Destroys the menu. This will remove the menu from the DOM and any events added to it etc.

</description>

</method>

<method name="renderNode" summary="Renders the specified menu node to the dom.">

<description>Renders the specified menu node to the dom.

</description>

<return type="Element">

<description>Container element for the drop menu.</description>

</return>

</method>

<method inherited-from="tinymce.ui.Menu" name="expand"/>

<method inherited-from="tinymce.ui.Menu" name="isCollapsed"/>

<method inherited-from="tinymce.ui.Menu" name="addSeparator"/>

<method inherited-from="tinymce.ui.Menu" name="addMenu"/>

<method inherited-from="tinymce.ui.Menu" name="hasMenus"/>

<method inherited-from="tinymce.ui.Menu" name="removeAll"/>

<method inherited-from="tinymce.ui.MenuItem" name="setSelected"/>

<method inherited-from="tinymce.ui.MenuItem" name="isSelected"/>

<method inherited-from="tinymce.ui.MenuItem" name="postRender"/>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderHTML"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Menu"/>

<class-ref class="tinymce.ui.MenuItem"/>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class fullname="tinymce.ui.KeyboardNavigation" name="KeyboardNavigation" summary="This class provides basic keyboard navigation using the arrow keys to children of a component.">

<description>This class provides basic keyboard navigation using the arrow keys to children of a component.

For example, this class handles moving between the buttons on the toolbars.

</description>

<members>

<method constructor="true" name="KeyboardNavigation" summary="Create a new KeyboardNavigation instance to handle the focus for a specific element.">

<description>Create a new KeyboardNavigation instance to handle the focus for a specific element.

</description>

<param name="settings" type="Object">

<description>the settings object to define how keyboard navigation works.</description>

</param>

<param name="dom" type="DOMUtils">

<description>the DOMUtils instance to use.</description>

</param>

</method>

<method name="destroy" summary="Destroys the KeyboardNavigation and unbinds any focus/blur event handles it might have added.">

<description>Destroys the KeyboardNavigation and unbinds any focus/blur event handles it might have added.

</description>

</method>

</members>

</class>

<class extends="tinymce.ui.Control" fullname="tinymce.ui.ListBox" name="ListBox" summary="This class is used to create list boxes/select list.">

<description>This class is used to create list boxes/select list. This one will generate

a non native control. This one has the benefits of having visual items added.

</description>

<example>// Creates a new plugin class and a custom listbox

tinymce.create('tinymce.plugins.ExamplePlugin', {

    createControl: function(n, cm) {

        switch (n) {

            case 'mylistbox':

                var mlb = cm.createListBox('mylistbox', {

                     title : 'My list box',

                     onselect : function(v) {

                         tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);

                     }

                });



                // Add some values to the list box

                mlb.add('Some item 1', 'val1');

                mlb.add('some item 2', 'val2');

                mlb.add('some item 3', 'val3');



                // Return the new listbox instance

                return mlb;

        }



        return null;

    }

});



// Register plugin with a short name

tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);



// Initialize TinyMCE with the new plugin and button

tinyMCE.init({

   ...

   plugins : '-example', // - means TinyMCE will not try to load it

   theme_advanced_buttons1 : 'mylistbox' // Add the new example listbox to the toolbar

});</example>

<members>

<method constructor="true" name="ListBox" summary="Constructs a new listbox control instance.">

<description>Constructs a new listbox control instance.

</description>

<param name="id" type="String">

<description>Control id for the list box.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

<param name="ed" type="Editor">

<description>Optional the editor instance this button is for.</description>

</param>

</method>

<property name="items" summary="Array of ListBox items." type="Array">

<description>Array of ListBox items.

</description>

</property>

<event name="onChange" summary="Fires when the selection has been changed.">

<description>Fires when the selection has been changed.

</description>

</event>

<event name="onPostRender" summary="Fires after the element has been rendered to DOM.">

<description>Fires after the element has been rendered to DOM.

</description>

</event>

<event name="onAdd" summary="Fires when a new item is added.">

<description>Fires when a new item is added.

</description>

</event>

<event name="onRenderMenu" summary="Fires when the menu gets rendered.">

<description>Fires when the menu gets rendered.

</description>

</event>

<method name="select" summary="Selects a item/option by value.">

<description>Selects a item/option by value. This will both add a visual selection to the

item and change the title of the control to the title of the option.

</description>

<param name="va">

<type fullname="String"/>

<type fullname="function"/>

<description>Value to look for inside the list box or a function selector.</description>

</param>

</method>

<method name="selectByIndex" summary="Selects a item/option by index.">

<description>Selects a item/option by index. This will both add a visual selection to the

item and change the title of the control to the title of the option.

</description>

<param name="idx" type="String">

<description>Index to select, pass -1 to select menu/title of select box.</description>

</param>

</method>

<method name="add" summary="Adds a option item to the list box.">

<description>Adds a option item to the list box.

</description>

<param name="n" type="String">

<description>Title for the new option.</description>

</param>

<param name="v" type="String">

<description>Value for the new option.</description>

</param>

<param name="o" type="Object">

<description>Optional object with settings like for example class.</description>

</param>

</method>

<method name="getLength" summary="Returns the number of items inside the list box.">

<description>Returns the number of items inside the list box.

</description>

<param name="Number" type="Number">

<description>of items inside the list box.</description>

</param>

</method>

<method name="renderHTML" summary="Renders the list box as a HTML string.">

<description>Renders the list box as a HTML string. This method is much faster than using the DOM and when

creating a whole toolbar with buttons it does make a lot of difference.

</description>

<return type="String">

<description>HTML for the list box control element.</description>

</return>

</method>

<method name="showMenu" summary="Displays the drop menu with all items.">

<description>Displays the drop menu with all items.

</description>

</method>

<method name="hideMenu" summary="Hides the drop menu.">

<description>Hides the drop menu.

</description>

</method>

<method name="renderMenu" summary="Renders the menu to the DOM.">

<description>Renders the menu to the DOM.

</description>

</method>

<method name="postRender" summary="Post render event.">

<description>Post render event. This will be executed after the control has been rendered and can be used to

set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent().

</description>

</method>

<method name="destroy" summary="Destroys the ListBox i.">

<description>Destroys the ListBox i.e. clear memory and events.

</description>

</method>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.MenuItem" fullname="tinymce.ui.Menu" name="Menu" summary="This class is base class for all menu types like DropMenus etc.">

<description>This class is base class for all menu types like DropMenus etc. This class should not

be instantiated directly other menu controls should inherit from this one.

</description>

<members>

<method constructor="true" name="Menu" summary="Constructs a new button control instance.">

<description>Constructs a new button control instance.

</description>

<param name="id" type="String">

<description>Button control id for the button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

</method>

<method name="expand" summary="Expands the menu, this will show them menu and all menu items.">

<description>Expands the menu, this will show them menu and all menu items.

</description>

<param name="d" type="Boolean">

<description>Optional deep state. If this is set to true all children will be expanded as well.</description>

</param>

</method>

<method name="collapse" summary="Collapses the menu, this will hide the menu and all menu items.">

<description>Collapses the menu, this will hide the menu and all menu items.

</description>

<param name="d" type="Boolean">

<description>Optional deep state. If this is set to true all children will be collapsed as well.</description>

</param>

</method>

<method name="isCollapsed" summary="Returns true/false if the menu has been collapsed or not.">

<description>Returns true/false if the menu has been collapsed or not.

</description>

<return type="Boolean">

<description>True/false state if the menu has been collapsed or not.</description>

</return>

</method>

<method name="add" summary="Adds a new menu, menu item or sub classes of them to the drop menu.">

<description>Adds a new menu, menu item or sub classes of them to the drop menu.

</description>

<param name="o" type="tinymce.ui.Control">

<description>Menu or menu item to add to the drop menu.</description>

</param>

<return type="tinymce.ui.Control">

<description>Same as the input control, the menu or menu item.</description>

</return>

</method>

<method name="addSeparator" summary="Adds a menu separator between the menu items.">

<description>Adds a menu separator between the menu items.

</description>

<return type="tinymce.ui.MenuItem">

<description>Menu item instance for the separator.</description>

</return>

</method>

<method name="addMenu" summary="Adds a sub menu to the menu.">

<description>Adds a sub menu to the menu.

</description>

<param name="o" type="Object">

<description>Menu control or a object with settings to be created into an control.</description>

</param>

<return type="tinymce.ui.Menu">

<description>Menu control instance passed in or created.</description>

</return>

</method>

<method name="hasMenus" summary="Returns true/false if the menu has sub menus or not.">

<description>Returns true/false if the menu has sub menus or not.

</description>

<return type="Boolean">

<description>True/false state if the menu has sub menues or not.</description>

</return>

</method>

<method name="remove" summary="Removes a specific sub menu or menu item from the menu.">

<description>Removes a specific sub menu or menu item from the menu.

</description>

<param name="o" type="tinymce.ui.Control">

<description>Menu item or menu to remove from menu.</description>

</param>

<return type="tinymce.ui.Control">

<description>Control instance or null if it wasn't found.</description>

</return>

</method>

<method name="removeAll" summary="Removes all menu items and sub menu items from the menu.">

<description>Removes all menu items and sub menu items from the menu.

</description>

</method>

<method name="createMenu" summary="Created a new sub menu for the menu control.">

<description>Created a new sub menu for the menu control.

</description>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

<return type="tinymce.ui.Menu">

<description>New drop menu instance.</description>

</return>

</method>

<method inherited-from="tinymce.ui.MenuItem" name="setSelected"/>

<method inherited-from="tinymce.ui.MenuItem" name="isSelected"/>

<method inherited-from="tinymce.ui.MenuItem" name="postRender"/>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderHTML"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.MenuItem"/>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.Control" fullname="tinymce.ui.MenuButton" name="MenuButton" summary="This class is used to create a UI button.">

<description>This class is used to create a UI button. A button is basically a link

that is styled to look like a button or icon.

</description>

<example>// Creates a new plugin class and a custom menu button

tinymce.create('tinymce.plugins.ExamplePlugin', {

    createControl: function(n, cm) {

        switch (n) {

            case 'mymenubutton':

                var c = cm.createSplitButton('mysplitbutton', {

                    title : 'My menu button',

                    image : 'some.gif'

                });



                c.onRenderMenu.add(function(c, m) {

                    m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1);



                    m.add({title : 'Some item 1', onclick : function() {

                        alert('Some item 1 was clicked.');

                    }});



                    m.add({title : 'Some item 2', onclick : function() {

                        alert('Some item 2 was clicked.');

                    }});

              });



              // Return the new menubutton instance

              return c;

        }



        return null;

    }

});</example>

<members>

<method constructor="true" name="MenuButton" summary="Constructs a new split button control instance.">

<description>Constructs a new split button control instance.

</description>

<param name="id" type="String">

<description>Control id for the split button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

<param name="ed" type="Editor">

<description>Optional the editor instance this button is for.</description>

</param>

</method>

<event name="onRenderMenu" summary="Fires when the menu is rendered.">

<description>Fires when the menu is rendered.

</description>

</event>

<method name="showMenu" summary="Shows the menu.">

<description>Shows the menu.

</description>

</method>

<method name="renderMenu" summary="Renders the menu to the DOM.">

<description>Renders the menu to the DOM.

</description>

</method>

<method name="hideMenu" summary="Hides the menu.">

<description>Hides the menu. The optional event parameter is used to check where the event occured so it

doesn't close them menu if it was a event inside the menu.

</description>

<param name="e" type="Event">

<description>Optional event object.</description>

</param>

</method>

<method name="postRender" summary="Post render handler.">

<description>Post render handler. This function will be called after the UI has been

rendered so that events can be added.

</description>

</method>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderHTML"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.Control" fullname="tinymce.ui.MenuItem" name="MenuItem" summary="This class is base class for all menu item types like DropMenus items etc.">

<description>This class is base class for all menu item types like DropMenus items etc. This class should not

be instantiated directly other menu items should inherit from this one.

</description>

<members>

<method constructor="true" name="MenuItem" summary="Constructs a new button control instance.">

<description>Constructs a new button control instance.

</description>

<param name="id" type="String">

<description>Button control id for the button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

</method>

<method name="setSelected" summary="Sets the selected state for the control.">

<description>Sets the selected state for the control. This will add CSS classes to the

element that contains the control. So that it can be selected visually.

</description>

<param name="s" type="Boolean">

<description>Boolean state if the control should be selected or not.</description>

</param>

</method>

<method name="isSelected" summary="Returns true/false if the control is selected or not.">

<description>Returns true/false if the control is selected or not.

</description>

<return type="Boolean">

<description>true/false if the control is selected or not.</description>

</return>

</method>

<method name="postRender" summary="Post render handler.">

<description>Post render handler. This function will be called after the UI has been

rendered so that events can be added.

</description>

</method>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderHTML"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.ListBox" fullname="tinymce.ui.NativeListBox" name="NativeListBox" summary="This class is used to create list boxes/select list.">

<description>This class is used to create list boxes/select list. This one will generate

a native control the way that the browser produces them by default.

</description>

<members>

<method constructor="true" name="NativeListBox" summary="Constructs a new button control instance.">

<description>Constructs a new button control instance.

</description>

<param name="id" type="String">

<description>Button control id for the button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

</method>

<method name="setDisabled" summary="Sets the disabled state for the control.">

<description>Sets the disabled state for the control. This will add CSS classes to the

element that contains the control. So that it can be disabled visually.

</description>

<param name="s" type="Boolean">

<description>Boolean state if the control should be disabled or not.</description>

</param>

</method>

<method name="isDisabled" summary="Returns true/false if the control is disabled or not.">

<description>Returns true/false if the control is disabled or not. This is a method since you can then

choose to check some class or some internal bool state in subclasses.

</description>

<return type="Boolean">

<description>true/false if the control is disabled or not.</description>

</return>

</method>

<method name="select" summary="Selects a item/option by value.">

<description>Selects a item/option by value. This will both add a visual selection to the

item and change the title of the control to the title of the option.

</description>

<param name="va">

<type fullname="String"/>

<type fullname="function"/>

<description>Value to look for inside the list box or a function selector.</description>

</param>

</method>

<method name="selectByIndex" summary="Selects a item/option by index.">

<description>Selects a item/option by index. This will both add a visual selection to the

item and change the title of the control to the title of the option.

</description>

<param name="idx" type="String">

<description>Index to select, pass -1 to select menu/title of select box.</description>

</param>

</method>

<method name="add" summary="Adds a option item to the list box.">

<description>Adds a option item to the list box.

</description>

<param name="n" type="String">

<description>Title for the new option.</description>

</param>

<param name="v" type="String">

<description>Value for the new option.</description>

</param>

<param name="o" type="Object">

<description>Optional object with settings like for example class.</description>

</param>

</method>

<method name="getLength" summary="Executes the specified callback function for the menu item.">

<description>Executes the specified callback function for the menu item. In this case when the user clicks the menu item.

</description>

</method>

<method name="renderHTML" summary="Renders the list box as a HTML string.">

<description>Renders the list box as a HTML string. This method is much faster than using the DOM and when

creating a whole toolbar with buttons it does make a lot of difference.

</description>

<return type="String">

<description>HTML for the list box control element.</description>

</return>

</method>

<method name="postRender" summary="Post render handler.">

<description>Post render handler. This function will be called after the UI has been

rendered so that events can be added.

</description>

</method>

<property inherited-from="tinymce.ui.ListBox" name="items"/>

<event inherited-from="tinymce.ui.ListBox" name="onChange"/>

<event inherited-from="tinymce.ui.ListBox" name="onPostRender"/>

<event inherited-from="tinymce.ui.ListBox" name="onAdd"/>

<event inherited-from="tinymce.ui.ListBox" name="onRenderMenu"/>

<method inherited-from="tinymce.ui.ListBox" name="showMenu"/>

<method inherited-from="tinymce.ui.ListBox" name="hideMenu"/>

<method inherited-from="tinymce.ui.ListBox" name="renderMenu"/>

<method inherited-from="tinymce.ui.ListBox" name="destroy"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.ListBox"/>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.Control" fullname="tinymce.ui.Separator" name="Separator" summary="This class is used to create vertical separator between other controls.">

<description>This class is used to create vertical separator between other controls.

</description>

<members>

<method constructor="true" name="Separator" summary="Separator constructor.">

<description>Separator constructor.

</description>

<param name="id" type="String">

<description>Control id to use for the Separator.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

</method>

<method name="renderHTML" summary="Renders the separator as a HTML string.">

<description>Renders the separator as a HTML string. This method is much faster than using the DOM and when

creating a whole toolbar with buttons it does make a lot of difference.

</description>

<return type="String">

<description>HTML for the separator control element.</description>

</return>

</method>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="postRender"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.Button" fullname="tinymce.ui.SplitButton" name="SplitButton" summary="This class is used to create a split button.">

<description>This class is used to create a split button. A button with a menu attached to it.

</description>

<example>// Creates a new plugin class and a custom split button

tinymce.create('tinymce.plugins.ExamplePlugin', {

    createControl: function(n, cm) {

        switch (n) {

            case 'mysplitbutton':

                var c = cm.createSplitButton('mysplitbutton', {

                    title : 'My split button',

                    image : 'some.gif',

                    onclick : function() {

                        alert('Button was clicked.');

                    }

                });



                c.onRenderMenu.add(function(c, m) {

                    m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1);



                    m.add({title : 'Some item 1', onclick : function() {

                        alert('Some item 1 was clicked.');

                    }});



                    m.add({title : 'Some item 2', onclick : function() {

                        alert('Some item 2 was clicked.');

                    }});

                });



              // Return the new splitbutton instance

              return c;

        }



        return null;

    }

});</example>

<members>

<method constructor="true" name="SplitButton" summary="Constructs a new split button control instance.">

<description>Constructs a new split button control instance.

</description>

<param name="id" type="String">

<description>Control id for the split button.</description>

</param>

<param name="s" type="Object">

<description>Optional name/value settings object.</description>

</param>

<param name="ed" type="Editor">

<description>Optional the editor instance this button is for.</description>

</param>

</method>

<method name="renderHTML" summary="Renders the split button as a HTML string.">

<description>Renders the split button as a HTML string. This method is much faster than using the DOM and when

creating a whole toolbar with buttons it does make a lot of difference.

</description>

<return type="String">

<description>HTML for the split button control element.</description>

</return>

</method>

<method name="postRender" summary="Post render handler.">

<description>Post render handler. This function will be called after the UI has been

rendered so that events can be added.

</description>

</method>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Button"/>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.Container" fullname="tinymce.ui.Toolbar" name="Toolbar" summary="This class is used to create toolbars a toolbar is a container for other controls like buttons etc.">

<description>This class is used to create toolbars a toolbar is a container for other controls like buttons etc.

</description>

<members>

<method name="renderHTML" summary="Renders the toolbar as a HTML string.">

<description>Renders the toolbar as a HTML string. This method is much faster than using the DOM and when

creating a whole toolbar with buttons it does make a lot of difference.

</description>

<return type="String">

<description>HTML for the toolbar control.</description>

</return>

</method>

<property inherited-from="tinymce.ui.Container" name="controls"/>

<method inherited-from="tinymce.ui.Container" name="add"/>

<method inherited-from="tinymce.ui.Container" name="get"/>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="postRender"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Container"/>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

<class extends="tinymce.ui.Container" fullname="tinymce.ui.ToolbarGroup" name="ToolbarGroup" summary="This class is used to group a set of toolbars together and control the keyboard navigation and focus.">

<description>This class is used to group a set of toolbars together and control the keyboard navigation and focus.

</description>

<members>

<method name="renderHTML" summary="Renders the toolbar group as a HTML string.">

<description>Renders the toolbar group as a HTML string.

</description>

<return type="String">

<description>HTML for the toolbar control.</description>

</return>

</method>

<property inherited-from="tinymce.ui.Container" name="controls"/>

<method inherited-from="tinymce.ui.Container" name="add"/>

<method inherited-from="tinymce.ui.Container" name="get"/>

<method inherited-from="tinymce.ui.Control" name="setDisabled"/>

<method inherited-from="tinymce.ui.Control" name="isDisabled"/>

<method inherited-from="tinymce.ui.Control" name="setActive"/>

<method inherited-from="tinymce.ui.Control" name="isActive"/>

<method inherited-from="tinymce.ui.Control" name="setState"/>

<method inherited-from="tinymce.ui.Control" name="isRendered"/>

<method inherited-from="tinymce.ui.Control" name="renderTo"/>

<method inherited-from="tinymce.ui.Control" name="postRender"/>

<method inherited-from="tinymce.ui.Control" name="remove"/>

<method inherited-from="tinymce.ui.Control" name="destroy"/>

</members>

<super-classes>

<class-ref class="tinymce.ui.Container"/>

<class-ref class="tinymce.ui.Control"/>

</super-classes>

</class>

</namespace>

<namespace fullname="tinymce.util" name="util">

<description>Contains various utility classes such as json parser, cookies etc.</description>

<class fullname="tinymce.util.Cookie" name="Cookie" static="true" summary="This class contains simple cookie manangement functions.">

<description>This class contains simple cookie manangement functions.

</description>

<example>// Gets a cookie from the browser

console.debug(tinymce.util.Cookie.get('mycookie'));



// Gets a hash table cookie from the browser and takes out the x parameter from it

console.debug(tinymce.util.Cookie.getHash('mycookie').x);



// Sets a hash table cookie to the browser

tinymce.util.Cookie.setHash({x : '1', y : '2'});</example>

<members>

<method name="getHash" static="true" summary="Parses the specified query string into an name/value object.">

<description>Parses the specified query string into an name/value object.

</description>

<param name="n" type="String">

<description>String to parse into a n Hashtable object.</description>

</param>

<return type="Object">

<description>Name/Value object with items parsed from querystring.</description>

</return>

</method>

<method name="setHash" static="true" summary="Sets a hashtable name/value object to a cookie.">

<description>Sets a hashtable name/value object to a cookie.

</description>

<param name="n" type="String">

<description>Name of the cookie.</description>

</param>

<param name="v" type="Object">

<description>Hashtable object to set as cookie.</description>

</param>

<param name="e" type="Date">

<description>Optional date object for the expiration of the cookie.</description>

</param>

<param name="p" type="String">

<description>Optional path to restrict the cookie to.</description>

</param>

<param name="d" type="String">

<description>Optional domain to restrict the cookie to.</description>

</param>

<param name="s" type="String">

<description>Is the cookie secure or not.</description>

</param>

</method>

<method name="get" static="true" summary="Gets the raw data of a cookie by name.">

<description>Gets the raw data of a cookie by name.

</description>

<param name="n" type="String">

<description>Name of cookie to retrive.</description>

</param>

<return type="String">

<description>Cookie data string.</description>

</return>

</method>

<method name="set" static="true" summary="Sets a raw cookie string.">

<description>Sets a raw cookie string.

</description>

<param name="n" type="String">

<description>Name of the cookie.</description>

</param>

<param name="v" type="String">

<description>Raw cookie data.</description>

</param>

<param name="e" type="Date">

<description>Optional date object for the expiration of the cookie.</description>

</param>

<param name="p" type="String">

<description>Optional path to restrict the cookie to.</description>

</param>

<param name="d" type="String">

<description>Optional domain to restrict the cookie to.</description>

</param>

<param name="s" type="String">

<description>Is the cookie secure or not.</description>

</param>

</method>

<method name="remove" static="true" summary="Removes/deletes a cookie by name.">

<description>Removes/deletes a cookie by name.

</description>

<param name="n" type="String">

<description>Cookie name to remove/delete.</description>

</param>

<param name="p" type="Strong">

<description>Optional path to remove the cookie from.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.util.Dispatcher" name="Dispatcher" summary="This class is used to dispatch event to observers/listeners.">

<description>This class is used to dispatch event to observers/listeners.

All internal events inside TinyMCE uses this class.

</description>

<example>// Creates a custom event

this.onSomething = new tinymce.util.Dispatcher(this);



// Dispatch/fire the event

this.onSomething.dispatch('some string');</example>

<members>

<method constructor="true" name="Dispatcher" summary="Constructs a new event dispatcher object.">

<description>Constructs a new event dispatcher object.

</description>

<param name="s" type="Object">

<description>Optional default execution scope for all observer functions.</description>

</param>

</method>

<method name="add" summary="Add an observer function to be executed when a dispatch call is done.">

<description>Add an observer function to be executed when a dispatch call is done.

</description>

<param name="cb" type="function">

<description>Callback function to execute when a dispatch event occurs.</description>

</param>

<param name="s" type="Object">

<description>Optional execution scope, defaults to the one specified in the class constructor.</description>

</param>

<return type="function">

<description>Returns the same function as the one passed on.</description>

</return>

</method>

<method name="addToTop" summary="Add an observer function to be executed to the top of the list of observers.">

<description>Add an observer function to be executed to the top of the list of observers.

</description>

<param name="cb" type="function">

<description>Callback function to execute when a dispatch event occurs.</description>

</param>

<param name="s" type="Object">

<description>Optional execution scope, defaults to the one specified in the class constructor.</description>

</param>

<return type="function">

<description>Returns the same function as the one passed on.</description>

</return>

</method>

<method name="remove" summary="Removes an observer function.">

<description>Removes an observer function.

</description>

<param name="cb" type="function">

<description>Observer function to remove.</description>

</param>

<return type="function">

<description>The same function that got passed in or null if it wasn't found.</description>

</return>

</method>

<method name="dispatch" summary="Dispatches an event to all observers/listeners.">

<description>Dispatches an event to all observers/listeners.

</description>

<param name=".." type="Object">

<description>Any number of arguments to dispatch.</description>

</param>

<return type="Object">

<description>Last observer functions return value.</description>

</return>

</method>

</members>

</class>

<class fullname="tinymce.util.JSON" name="JSON" static="true" summary="JSON parser and serializer class.">

<description>JSON parser and serializer class.

</description>

<example>// JSON parse a string into an object

var obj = tinymce.util.JSON.parse(somestring);



// JSON serialize a object into an string

var str = tinymce.util.JSON.serialize(obj);</example>

<members>

<method name="serialize" static="true" summary="Serializes the specified object as a JSON string.">

<description>Serializes the specified object as a JSON string.

</description>

<param name="obj" type="Object">

<description>Object to serialize as a JSON string.</description>

</param>

<param name="quote" type="String">

<description>Optional quote string defaults to ".</description>

</param>

<return type="string">

<description>JSON string serialized from input.</description>

</return>

</method>

<method name="parse" static="true" summary="Unserializes/parses the specified JSON string into a object.">

<description>Unserializes/parses the specified JSON string into a object.

</description>

<param name="s" type="string">

<description>JSON String to parse into a JavaScript object.</description>

</param>

<return type="Object">

<description>Object from input JSON string or undefined if it failed.</description>

</return>

</method>

</members>

</class>

<class fullname="tinymce.util.JSONRequest" name="JSONRequest" summary="This class enables you to use JSON-RPC to call backend methods.">

<description>This class enables you to use JSON-RPC to call backend methods.

</description>

<example>var json = new tinymce.util.JSONRequest({

    url : 'somebackend.php'

});



// Send RPC call 1

json.send({

    method : 'someMethod1',

    params : ['a', 'b'],

    success : function(result) {

        console.dir(result);

    }

});



// Send RPC call 2

json.send({

    method : 'someMethod2',

    params : ['a', 'b'],

    success : function(result) {

        console.dir(result);

    }

});</example>

<members>

<method constructor="true" name="JSONRequest" summary="Constructs a new JSONRequest instance.">

<description>Constructs a new JSONRequest instance.

</description>

<param name="s" type="Object">

<description>Optional settings object.</description>

</param>

</method>

<method name="send" summary="Sends a JSON-RPC call.">

<description>Sends a JSON-RPC call. Consult the Wiki API documentation for more details on what you can pass to this function.

</description>

<param name="o" type="Object">

<description>Call object where there are three field id, method and params this object should also contain callbacks etc.</description>

</param>

</method>

<method name="sendRPC" static="true" summary="Simple helper function to send a JSON-RPC request without the need to initialize an object.">

<description>Simple helper function to send a JSON-RPC request without the need to initialize an object.

Consult the Wiki API documentation for more details on what you can pass to this function.

</description>

<param name="o" type="Object">

<description>Call object where there are three field id, method and params this object should also contain callbacks etc.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.util.URI" name="URI" summary="This class handles parsing, modification and serialization of URI/URL strings.">

<description>This class handles parsing, modification and serialization of URI/URL strings.</description>

<members>

<method constructor="true" name="URI" summary="Constucts a new URI instance.">

<description>Constucts a new URI instance.

</description>

<param name="u" type="String">

<description>URI string to parse.</description>

</param>

<param name="s" type="Object">

<description>Optional settings object.</description>

</param>

</method>

<method name="setPath" summary="Sets the internal path part of the URI.">

<description>Sets the internal path part of the URI.

</description>

<param name="p" type="string">

<description>Path string to set.</description>

</param>

</method>

<method name="toRelative" summary="Converts the specified URI into a relative URI based on the current URI instance location.">

<description>Converts the specified URI into a relative URI based on the current URI instance location.

</description>

<param name="u" type="String">

<description>URI to convert into a relative path/URI.</description>

</param>

<return type="String">

<description>Relative URI from the point specified in the current URI instance.</description>

</return>

<example>// Converts an absolute URL to an relative URL url will be somedir/somefile.htm

var url = new tinymce.util.URI('http://www.site.com/dir/').toRelative('http://www.site.com/dir/somedir/somefile.htm');</example>

</method>

<method name="toAbsolute" summary="Converts the specified URI into a absolute URI based on the current URI instance location.">

<description>Converts the specified URI into a absolute URI based on the current URI instance location.

</description>

<param name="u" type="String">

<description>URI to convert into a relative path/URI.</description>

</param>

<param name="nh" type="Boolean">

<description>No host and protocol prefix.</description>

</param>

<return type="String">

<description>Absolute URI from the point specified in the current URI instance.</description>

</return>

<example>// Converts an relative URL to an absolute URL url will be http://www.site.com/dir/somedir/somefile.htm

var url = new tinymce.util.URI('http://www.site.com/dir/').toAbsolute('somedir/somefile.htm');</example>

</method>

<method name="toRelPath" summary="Converts a absolute path into a relative path.">

<description>Converts a absolute path into a relative path.

</description>

<param name="base" type="String">

<description>Base point to convert the path from.</description>

</param>

<param name="path" type="String">

<description>Absolute path to convert into a relative path.</description>

</param>

</method>

<method name="toAbsPath" summary="Converts a relative path into a absolute path.">

<description>Converts a relative path into a absolute path.

</description>

<param name="base" type="String">

<description>Base point to convert the path from.</description>

</param>

<param name="path" type="String">

<description>Relative path to convert into an absolute path.</description>

</param>

</method>

<method name="getURI" summary="Returns the full URI of the internal structure.">

<description>Returns the full URI of the internal structure.

</description>

<param name="nh" type="Boolean">

<description>Optional no host and protocol part. Defaults to false.</description>

</param>

</method>

</members>

</class>

<class fullname="tinymce.util.XHR" name="XHR" static="true" summary="This class enables you to send XMLHTTPRequests cross browser.">

<description>This class enables you to send XMLHTTPRequests cross browser.</description>

<example>// Sends a low level Ajax request

tinymce.util.XHR.send({

   url : 'someurl',

   success : function(text) {

      console.debug(text);

   }

});</example>

<members>

<method name="send" static="true" summary="Sends a XMLHTTPRequest.">

<description>Sends a XMLHTTPRequest.

Consult the Wiki for details on what settings this method takes.

</description>

<param name="o" type="Object">

<description>Object will target URL, callbacks and other info needed to make the request.</description>

</param>

</method>

</members>

</class>

</namespace>

<namespace fullname="tinymce.plugins" name="plugins">

<description>Contains plugin classes.</description>

<class fullname="tinymce.plugins.AutoSave" name="AutoSave" summary="This plugin adds auto-save capability to the TinyMCE text editor to rescue content inadvertently lost.">

<description>This plugin adds auto-save capability to the TinyMCE text editor to rescue content

inadvertently lost. By using localStorage.

</description>

<members>

<method name="init" summary="Initializes the plugin, this will be executed after the plugin has been created.">

<description>Initializes the plugin, this will be executed after the plugin has been created.

This call is done before the editor instance has finished it's initialization so use the onInit event

of the editor instance to intercept that event.

</description>

<param name="ed" type="tinymce.Editor">

<description>Editor instance that the plugin is initialized in.</description>

</param>

<param name="url" type="string">

<description>Absolute URL to where the plugin is located.</description>

</param>

</method>

<event name="onStoreDraft" summary="This event gets fired when a draft is stored to local storage.">

<description>This event gets fired when a draft is stored to local storage.

</description>

<param name="sender" type="tinymce.plugins.AutoSave">

<description>Plugin instance sending the event.</description>

</param>

<param name="draft" type="Object">

<description>Draft object containing the HTML contents of the editor.</description>

</param>

</event>

<event name="onStoreDraft" summary="This event gets fired when a draft is restored from local storage.">

<description>This event gets fired when a draft is restored from local storage.

</description>

<param name="sender" type="tinymce.plugins.AutoSave">

<description>Plugin instance sending the event.</description>

</param>

<param name="draft" type="Object">

<description>Draft object containing the HTML contents of the editor.</description>

</param>

</event>

<event name="onRemoveDraft" summary="This event gets fired when a draft removed/expired.">

<description>This event gets fired when a draft removed/expired.

</description>

<param name="sender" type="tinymce.plugins.AutoSave">

<description>Plugin instance sending the event.</description>

</param>

<param name="draft" type="Object">

<description>Draft object containing the HTML contents of the editor.</description>

</param>

</event>

<method name="getInfo" summary="Returns information about the plugin as a name/value array.">

<description>Returns information about the plugin as a name/value array.

The current keys are longname, author, authorurl, infourl and version.

</description>

<return type="Object">

<description>Name/value array containing information about the plugin.</description>

</return>

</method>

<method name="getExpDate" summary="Returns an expiration date UTC string.">

<description>Returns an expiration date UTC string.

</description>

<return type="String">

<description>Expiration date UTC string.</description>

</return>

</method>

<method name="setupStorage" summary="This method will setup the storage engine.">

<description>This method will setup the storage engine. If the browser has support for it.

</description>

</method>

<method name="storeDraft" summary="This method will store the current contents in the the storage engine.">

<description>This method will store the current contents in the the storage engine.

</description>

</method>

<method name="restoreDraft" summary="This method will restore the contents from the storage engine back to the editor.">

<description>This method will restore the contents from the storage engine back to the editor.

</description>

</method>

<method name="hasDraft" summary="This method will return true/false if there is a local storage draft available.">

<description>This method will return true/false if there is a local storage draft available.

</description>

<return type="boolean">

<description>true/false state if there is a local draft.</description>

</return>

</method>

<method name="removeDraft" summary="Removes the currently stored draft.">

<description>Removes the currently stored draft.

</description>

</method>

</members>

</class>

<class fullname="tinymce.plugins.ContextMenu" name="ContextMenu" summary="This plugin a context menu to TinyMCE editor instances.">

<description>This plugin a context menu to TinyMCE editor instances.

</description>

<members>

<method name="init" summary="Initializes the plugin, this will be executed after the plugin has been created.">

<description>Initializes the plugin, this will be executed after the plugin has been created.

This call is done before the editor instance has finished it's initialization so use the onInit event

of the editor instance to intercept that event.

</description>

<param name="ed" type="tinymce.Editor">

<description>Editor instance that the plugin is initialized in.</description>

</param>

<param name="url" type="string">

<description>Absolute URL to where the plugin is located.</description>

</param>

</method>

<event name="onContextMenu" summary="This event gets fired when the context menu is shown.">

<description>This event gets fired when the context menu is shown.

</description>

<param name="sender" type="tinymce.plugins.ContextMenu">

<description>Plugin instance sending the event.</description>

</param>

<param name="menu" type="tinymce.ui.DropMenu">

<description>Drop down menu to fill with more items if needed.</description>

</param>

</event>

<method name="getInfo" summary="Returns information about the plugin as a name/value array.">

<description>Returns information about the plugin as a name/value array.

The current keys are longname, author, authorurl, infourl and version.

</description>

<return type="Object">

<description>Name/value array containing information about the plugin.</description>

</return>

</method>

</members>

</class>

</namespace>

<members>

<property fullname="tinymce.EditorManager" name="EditorManager" summary="Alternative name for tinymce added for compatibility." type="tinymce">

<description>Alternative name for tinymce added for compatibility.

</description>

<example>// To initialize editor instances

tinymce.EditorManager.get('editor');</example>

</property>

<property fullname="tinymce.DOM" name="DOM" summary="Instance of DOMUtils for the current document." type="tinymce.dom.DOMUtils">

<description>Instance of DOMUtils for the current document.

</description>

<example>// Example of how to add a class to some element by id

tinymce.DOM.addClass('someid', 'someclass');</example>

</property>

</members>

</namespace>

<class fullname="tinymce" name="tinymce" static="true" summary="Core namespace with core functionality for the TinyMCE API all sub classes will be added to this namespace/object.">

<description/>

<members>

<property name="baseURI" summary="Absolute baseURI for the installation path of TinyMCE." type="tinymce.util.URI">

<description>Absolute baseURI for the installation path of TinyMCE.

</description>

</property>

<event name="onAddEditor" summary="Fires when a new editor instance is added to the tinymce collection.">

<description>Fires when a new editor instance is added to the tinymce collection.

</description>

<param name="sender" type="tinymce">

<description>TinyMCE root class/namespace.</description>

</param>

<param name="editor" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>tinyMCE.execCommand("mceAddControl", false, "some_textarea");

tinyMCE.onAddEditor.add(function(mgr,ed) {

    console.debug('A new editor is available' + ed.id);

});</example>

</event>

<event name="onRemoveEditor" summary="Fires when an editor instance is removed from the tinymce collection.">

<description>Fires when an editor instance is removed from the tinymce collection.

</description>

<param name="sender" type="tinymce">

<description>TinyMCE root class/namespace.</description>

</param>

<param name="editor" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

</event>

<property name="editors" summary="Collection of editor instances." type="Object">

<description>Collection of editor instances.

</description>

<example>for (edId in tinyMCE.editors)

    tinyMCE.editors[edId].save();</example>

</property>

<property name="i18n" summary="Collection of language pack data." type="Object">

<description>Collection of language pack data.

</description>

</property>

<property name="activeEditor" summary="Currently active editor instance." type="tinymce.Editor">

<description>Currently active editor instance.

</description>

<example>tinyMCE.activeEditor.selection.getContent();

tinymce.EditorManager.activeEditor.selection.getContent();</example>

</property>

<method name="init" summary="Initializes a set of editors.">

<description>Initializes a set of editors. This method will create a bunch of editors based in the input.

</description>

<param name="s" type="Object">

<description>Settings object to be passed to each editor instance.</description>

</param>

<example>// Initializes a editor using the longer method

tinymce.EditorManager.init({

   some_settings : 'some value'

});



// Initializes a editor instance using the shorter version

tinyMCE.init({

   some_settings : 'some value'

});</example>

</method>

<method name="get" summary="Returns a editor instance by id.">

<description>Returns a editor instance by id.

</description>

<param name="id">

<type fullname="String"/>

<type fullname="Number"/>

<description>Editor instance id or index to return.</description>

</param>

<return type="tinymce.Editor">

<description>Editor instance to return.</description>

</return>

<example>// Adds an onclick event to an editor by id (shorter version)

tinyMCE.get('mytextbox').onClick.add(function(ed, e) {

   ed.windowManager.alert('Hello world!');

});



// Adds an onclick event to an editor by id (longer version)

tinymce.EditorManager.get('mytextbox').onClick.add(function(ed, e) {

   ed.windowManager.alert('Hello world!');

});</example>

</method>

<method deprecated="Use get method instead." name="getInstanceById" summary="Returns a editor instance by id.">

<description>Returns a editor instance by id. This method was added for compatibility with the 2.x branch.

</description>

<param name="id" type="String">

<description>Editor instance id to return.</description>

</param>

<return type="tinymce.Editor">

<description>Editor instance to return.</description>

</return>

<see member="get"/>

</method>

<method name="add" summary="Adds an editor instance to the editor collection.">

<description>Adds an editor instance to the editor collection. This will also set it as the active editor.

</description>

<param name="editor" type="tinymce.Editor">

<description>Editor instance to add to the collection.</description>

</param>

<return type="tinymce.Editor">

<description>The same instance that got passed in.</description>

</return>

</method>

<method name="remove" summary="Removes a editor instance from the collection.">

<description>Removes a editor instance from the collection.

</description>

<param name="e" type="tinymce.Editor">

<description>Editor instance to remove.</description>

</param>

<return type="tinymce.Editor">

<description>The editor that got passed in will be return if it was found otherwise null.</description>

</return>

</method>

<method name="execCommand" summary="Executes a specific command on the currently active editor.">

<description>Executes a specific command on the currently active editor.

</description>

<param name="c" type="String">

<description>Command to perform for example Bold.</description>

</param>

<param name="u" type="Boolean">

<description>Optional boolean state if a UI should be presented for the command or not.</description>

</param>

<param name="v" type="String">

<description>Optional value parameter like for example an URL to a link.</description>

</param>

<return type="Boolean">

<description>true/false if the command was executed or not.</description>

</return>

</method>

<method deprecated="Use the execCommand method of a editor instance instead." name="execInstanceCommand" summary="Executes a command on a specific editor by id.">

<description>Executes a command on a specific editor by id. This method was added for compatibility with the 2.x branch.

</description>

<param name="id" type="String">

<description>Editor id to perform the command on.</description>

</param>

<param name="c" type="String">

<description>Command to perform for example Bold.</description>

</param>

<param name="u" type="Boolean">

<description>Optional boolean state if a UI should be presented for the command or not.</description>

</param>

<param name="v" type="String">

<description>Optional value parameter like for example an URL to a link.</description>

</param>

<return type="Boolean">

<description>true/false if the command was executed or not.</description>

</return>

</method>

<method name="triggerSave" summary="Calls the save method on all editor instances in the collection.">

<description>Calls the save method on all editor instances in the collection. This can be useful when a form is to be submitted.

</description>

<example>// Saves all contents

tinyMCE.triggerSave();</example>

</method>

<method name="addI18n" summary="Adds a language pack, this gets called by the loaded language files like en.">

<description>Adds a language pack, this gets called by the loaded language files like en.js.

</description>

<param name="p" type="String">

<description>Prefix for the language items. For example en.myplugin</description>

</param>

<param name="o" type="Object">

<description>Name/Value collection with items to add to the language group.</description>

</param>

</method>

<property name="majorVersion" static="true" summary="Major version of TinyMCE build." type="String">

<description>Major version of TinyMCE build.

</description>

</property>

<property name="minorVersion" static="true" summary="Major version of TinyMCE build." type="String">

<description>Major version of TinyMCE build.

</description>

</property>

<property name="releaseDate" static="true" summary="Release date of TinyMCE build." type="String">

<description>Release date of TinyMCE build.

</description>

</property>

<property final="true" name="isOpera" static="true" summary="Constant that is true if the browser is Opera." type="Boolean">

<description>Constant that is true if the browser is Opera.

</description>

</property>

<property final="true" name="isWebKit" static="true" summary="Constant that is true if the browser is WebKit (Safari/Chrome)." type="Boolean">

<description>Constant that is true if the browser is WebKit (Safari/Chrome).

</description>

</property>

<property final="true" name="isIE" static="true" summary="Constant that is true if the browser is IE." type="Boolean">

<description>Constant that is true if the browser is IE.

</description>

</property>

<property final="true" name="isIE6" static="true" summary="Constant that is true if the browser is IE 6 or older." type="Boolean">

<description>Constant that is true if the browser is IE 6 or older.

</description>

</property>

<property final="true" name="isIE7" static="true" summary="Constant that is true if the browser is IE 7." type="Boolean">

<description>Constant that is true if the browser is IE 7.

</description>

</property>

<property final="true" name="isIE8" static="true" summary="Constant that is true if the browser is IE 8." type="Boolean">

<description>Constant that is true if the browser is IE 8.

</description>

</property>

<property final="true" name="isIE9" static="true" summary="Constant that is true if the browser is IE 9." type="Boolean">

<description>Constant that is true if the browser is IE 9.

</description>

</property>

<property final="true" name="isGecko" static="true" summary="Constant that is true if the browser is Gecko." type="Boolean">

<description>Constant that is true if the browser is Gecko.

</description>

</property>

<property final="true" name="isMac" static="true" summary="Constant that is true if the os is Mac OS." type="Boolean">

<description>Constant that is true if the os is Mac OS.

</description>

</property>

<property final="true" name="isAir" static="true" summary="Constant that is true if the runtime is Adobe Air." type="Boolean">

<description>Constant that is true if the runtime is Adobe Air.

</description>

</property>

<property final="true" name="isIDevice" static="true" summary="Constant that tells if the current browser is an iPhone or iPad." type="Boolean">

<description>Constant that tells if the current browser is an iPhone or iPad.

</description>

</property>

<property final="true" name="isIOS5" static="true" summary="Constant that is true if the current browser is running on iOS 5 or greater." type="Boolean">

<description>Constant that is true if the current browser is running on iOS 5 or greater.

</description>

</property>

<method name="is" static="true" summary="Checks if a object is of a specific type for example an array.">

<description>Checks if a object is of a specific type for example an array.

</description>

<param name="o" type="Object">

<description>Object to check type of.</description>

</param>

<param name="t" type="string">

<description>Optional type to check for.</description>

</param>

<return type="Boolean">

<description>true/false if the object is of the specified type.</description>

</return>

</method>

<method name="makeMap" static="true" summary="Makes a name/object map out of an array with names.">

<description>Makes a name/object map out of an array with names.

</description>

<param name="items">

<type fullname="Array"/>

<type fullname="String"/>

<description>Items to make map out of.</description>

</param>

<param name="delim" type="String">

<description>Optional delimiter to split string by.</description>

</param>

<param name="map" type="Object">

<description>Optional map to add items to.</description>

</param>

<return type="Object">

<description>Name/value map of items.</description>

</return>

</method>

<method name="each" static="true" summary="Performs an iteration of all items in a collection such as an object or array.">

<description>Performs an iteration of all items in a collection such as an object or array. This method will execure the

callback function for each item in the collection, if the callback returns false the iteration will terminate.

The callback has the following format: cb(value, key_or_index).

</description>

<param name="o" type="Object">

<description>Collection to iterate.</description>

</param>

<param name="cb" type="function">

<description>Callback function to execute for each item.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the callback in.</description>

</param>

<example>// Iterate an array

tinymce.each([1,2,3], function(v, i) {

    console.debug("Value: " + v + ", Index: " + i);

});



// Iterate an object

tinymce.each({a : 1, b : 2, c: 3], function(v, k) {

    console.debug("Value: " + v + ", Key: " + k);

});</example>

</method>

<method name="map" static="true" summary="Creates a new array by the return value of each iteration function call.">

<description>Creates a new array by the return value of each iteration function call. This enables you to convert

one array list into another.

</description>

<param name="a" type="Array">

<description>Array of items to iterate.</description>

</param>

<param name="f" type="function">

<description>Function to call for each item. It's return value will be the new value.</description>

</param>

<return type="Array">

<description>Array with new values based on function return values.</description>

</return>

</method>

<method name="grep" static="true" summary="Filters out items from the input array by calling the specified function for each item.">

<description>Filters out items from the input array by calling the specified function for each item.

If the function returns false the item will be excluded if it returns true it will be included.

</description>

<param name="a" type="Array">

<description>Array of items to loop though.</description>

</param>

<param name="f" type="function">

<description>Function to call for each item. Include/exclude depends on it's return value.</description>

</param>

<return type="Array">

<description>New array with values imported and filtered based in input.</description>

</return>

<example>// Filter out some items, this will return an array with 4 and 5

var items = tinymce.grep([1,2,3,4,5], function(v) {return v &gt; 3;});</example>

</method>

<method name="inArray" static="true" summary="Returns the index of a value in an array, this method will return -1 if the item wasn't found.">

<description>Returns the index of a value in an array, this method will return -1 if the item wasn't found.

</description>

<param name="a" type="Array">

<description>Array/Object to search for value in.</description>

</param>

<param name="v" type="Object">

<description>Value to check for inside the array.</description>

</param>

<return>

<type fullname="Number"/>

<type fullname="String"/>

<description>Index of item inside the array inside an object. Or -1 if it wasn't found.</description>

</return>

<example>// Get index of value in array this will alert 1 since 2 is at that index

alert(tinymce.inArray([1,2,3], 2));</example>

</method>

<method name="extend" static="true" summary="Extends an object with the specified other object(s).">

<description>Extends an object with the specified other object(s).

</description>

<param name="o" type="Object">

<description>Object to extend with new items.</description>

</param>

<param name="e..n" type="Object">

<description>Object(s) to extend the specified object with.</description>

</param>

<return type="Object">

<description>o New extended object, same reference as the input object.</description>

</return>

<example>// Extends obj1 with two new fields

var obj = tinymce.extend(obj1, {

    somefield1 : 'a',

    somefield2 : 'a'

});



// Extends obj with obj2 and obj3

tinymce.extend(obj, obj2, obj3);</example>

</method>

<method name="trim" static="true" summary="Removes whitespace from the beginning and end of a string.">

<description>Removes whitespace from the beginning and end of a string.

</description>

<param name="s" type="String">

<description>String to remove whitespace from.</description>

</param>

<return type="String">

<description>New string with removed whitespace.</description>

</return>

</method>

<method name="create" static="true" summary="Creates a class, subclass or static singleton.">

<description>Creates a class, subclass or static singleton.

More details on this method can be found in the Wiki.

</description>

<param name="s" type="String">

<description>Class name, inheritage and prefix.</description>

</param>

<param name="p" type="Object">

<description>Collection of methods to add to the class.</description>

</param>

<param name="root" type="Object">

<description>Optional root object defaults to the global window object.</description>

</param>

<example>// Creates a basic class

tinymce.create('tinymce.somepackage.SomeClass', {

    SomeClass : function() {

        // Class constructor

    },



    method : function() {

        // Some method

    }

});



// Creates a basic subclass class

tinymce.create('tinymce.somepackage.SomeSubClass:tinymce.somepackage.SomeClass', {

    SomeSubClass: function() {

        // Class constructor

        this.parent(); // Call parent constructor

    },



    method : function() {

        // Some method

        this.parent(); // Call parent method

    },



    'static' : {

        staticMethod : function() {

            // Static method

        }

    }

});



// Creates a singleton/static class

tinymce.create('static tinymce.somepackage.SomeSingletonClass', {

    method : function() {

        // Some method

    }

});</example>

</method>

<method name="walk" static="true" summary="Executed the specified function for each item in a object tree.">

<description>Executed the specified function for each item in a object tree.

</description>

<param name="o" type="Object">

<description>Object tree to walk though.</description>

</param>

<param name="f" type="function">

<description>Function to call for each item.</description>

</param>

<param name="n" type="String">

<description>Optional name of collection inside the objects to walk for example childNodes.</description>

</param>

<param name="s" type="String">

<description>Optional scope to execute the function in.</description>

</param>

</method>

<method name="createNS" static="true" summary="Creates a namespace on a specific object.">

<description>Creates a namespace on a specific object.

</description>

<param name="n" type="String">

<description>Namespace to create for example a.b.c.d.</description>

</param>

<param name="o" type="Object">

<description>Optional object to add namespace to, defaults to window.</description>

</param>

<return type="Object">

<description>New namespace object the last item in path.</description>

</return>

<example>// Create some namespace

tinymce.createNS('tinymce.somepackage.subpackage');



// Add a singleton

var tinymce.somepackage.subpackage.SomeSingleton = {

    method : function() {

        // Some method

    }

};</example>

</method>

<method name="resolve" static="true" summary="Resolves a string and returns the object from a specific structure.">

<description>Resolves a string and returns the object from a specific structure.

</description>

<param name="n" type="String">

<description>Path to resolve for example a.b.c.d.</description>

</param>

<param name="o" type="Object">

<description>Optional object to search though, defaults to window.</description>

</param>

<return type="Object">

<description>Last object in path or null if it couldn't be resolved.</description>

</return>

<example>// Resolve a path into an object reference

var obj = tinymce.resolve('a.b.c.d');</example>

</method>

<method name="addUnload" static="true" summary="Adds an unload handler to the document.">

<description>Adds an unload handler to the document. This handler will be executed when the document gets unloaded.

This method is useful for dealing with browser memory leaks where it might be vital to remove DOM references etc.

</description>

<param name="f" type="function">

<description>Function to execute before the document gets unloaded.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the function in.</description>

</param>

<return type="function">

<description>Returns the specified unload handler function.</description>

</return>

<example>// Fixes a leak with a DOM element that was palces in the someObject

tinymce.addUnload(function() {

    // Null DOM element to reduce IE memory leak

    someObject.someElement = null;

});</example>

</method>

<method name="removeUnload" static="true" summary="Removes the specified function form the unload handler list.">

<description>Removes the specified function form the unload handler list.

</description>

<param name="f" type="function">

<description>Function to remove from unload handler list.</description>

</param>

<return type="function">

<description>Removed function name or null if it wasn't found.</description>

</return>

</method>

<method name="explode" static="true" summary="Splits a string but removes the whitespace before and after each value.">

<description>Splits a string but removes the whitespace before and after each value.

</description>

<param name="s" type="string">

<description>String to split.</description>

</param>

<param name="d" type="string">

<description>Delimiter to split by.</description>

</param>

<example>// Split a string into an array with a,b,c

var arr = tinymce.explode('a, b,   c');</example>

</method>

</members>

<description>Core namespace with core functionality for the TinyMCE API all sub classes will be added to this namespace/object.

</description>

<example>// Using each method

tinymce.each([1, 2, 3], function(v, i) {

  console.log(i + '=' + v);

});



// Checking for a specific browser

if (tinymce.isIE)

  console.log("IE");</example>

</class>

<class fullname="tinyMCEPopup" name="tinyMCEPopup" static="true" summary="TinyMCE popup/dialog helper class.">

<description>TinyMCE popup/dialog helper class. This gives you easy access to the

parent editor instance and a bunch of other things. It's higly recommended

that you load this script into your dialogs.

</description>

<members>

<method name="init" static="true" summary="Initializes the popup this will be called automatically.">

<description>Initializes the popup this will be called automatically.

</description>

</method>

<event name="onInit" static="true" summary="Fires when the popup is initialized.">

<description>Fires when the popup is initialized.

</description>

<param name="editor" type="tinymce.Editor">

<description>Editor instance.</description>

</param>

<example>// Alerts the selected contents when the dialog is loaded

tinyMCEPopup.onInit.add(function(ed) {

    alert(ed.selection.getContent());

});



// Executes the init method on page load in some object using the SomeObject scope

tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);</example>

</event>

<method name="getWin" static="true" summary="Returns the reference to the parent window that opened the dialog.">

<description>Returns the reference to the parent window that opened the dialog.

</description>

<return type="Window">

<description>Reference to the parent window that opened the dialog.</description>

</return>

</method>

<method name="getWindowArg" static="true" summary="Returns a window argument/parameter by name.">

<description>Returns a window argument/parameter by name.

</description>

<param name="n" type="String">

<description>Name of the window argument to retrive.</description>

</param>

<param name="dv" type="String">

<description>Optional default value to return.</description>

</param>

<return type="String">

<description>Argument value or default value if it wasn't found.</description>

</return>

</method>

<method name="getParam" static="true" summary="Returns a editor parameter/config option value.">

<description>Returns a editor parameter/config option value.

</description>

<param name="n" type="String">

<description>Name of the editor config option to retrive.</description>

</param>

<param name="dv" type="String">

<description>Optional default value to return.</description>

</param>

<return type="String">

<description>Parameter value or default value if it wasn't found.</description>

</return>

</method>

<method name="getLang" static="true" summary="Returns a language item by key.">

<description>Returns a language item by key.

</description>

<param name="n" type="String">

<description>Language item like mydialog.something.</description>

</param>

<param name="dv" type="String">

<description>Optional default value to return.</description>

</param>

<return type="String">

<description>Language value for the item like "my string" or the default value if it wasn't found.</description>

</return>

</method>

<method name="execCommand" static="true" summary="Executed a command on editor that opened the dialog/popup.">

<description>Executed a command on editor that opened the dialog/popup.

</description>

<param name="cmd" type="String">

<description>Command to execute.</description>

</param>

<param name="ui" type="Boolean">

<description>Optional boolean value if the UI for the command should be presented or not.</description>

</param>

<param name="val" type="Object">

<description>Optional value to pass with the comman like an URL.</description>

</param>

<param name="a" type="Object">

<description>Optional arguments object.</description>

</param>

</method>

<method name="resizeToInnerSize" static="true" summary="Resizes the dialog to the inner size of the window.">

<description>Resizes the dialog to the inner size of the window. This is needed since various browsers

have different border sizes on windows.

</description>

</method>

<method name="executeOnLoad" static="true" summary="Will executed the specified string when the page has been loaded.">

<description>Will executed the specified string when the page has been loaded. This function

was added for compatibility with the 2.x branch.

</description>

<param name="s" type="String">

<description>String to evalutate on init.</description>

</param>

</method>

<method name="storeSelection" static="true" summary="Stores the current editor selection for later restoration.">

<description>Stores the current editor selection for later restoration. This can be useful since some browsers

looses it's selection if a control element is selected/focused inside the dialogs.

</description>

</method>

<method name="restoreSelection" static="true" summary="Restores any stored selection.">

<description>Restores any stored selection. This can be useful since some browsers

looses it's selection if a control element is selected/focused inside the dialogs.

</description>

</method>

<method name="requireLangPack" static="true" summary="Loads a specific dialog language pack.">

<description>Loads a specific dialog language pack. If you pass in plugin_url as a arugment

when you open the window it will load the &lt;plugin url&gt;/langs/&lt;code&gt;_dlg.js lang pack file.

</description>

</method>

<method name="pickColor" static="true" summary="Executes a color picker on the specified element id.">

<description>Executes a color picker on the specified element id. When the user

then selects a color it will be set as the value of the specified element.

</description>

<param name="e" type="DOMEvent">

<description>DOM event object.</description>

</param>

<param name="element_id" type="string">

<description>Element id to be filled with the color value from the picker.</description>

</param>

</method>

<method name="openBrowser" static="true" summary="Opens a filebrowser/imagebrowser this will set the output value from the browser as a value on the specified element.">

<description>Opens a filebrowser/imagebrowser this will set the output value from

the browser as a value on the specified element.

</description>

<param name="element_id" type="string">

<description>Id of the element to set value in.</description>

</param>

<param name="type" type="string">

<description>Type of browser to open image/file/flash.</description>

</param>

<param name="option" type="string">

<description>Option name to get the file_broswer_callback function name from.</description>

</param>

</method>

<method name="confirm" static="true" summary="Creates a confirm dialog.">

<description>Creates a confirm dialog. Please don't use the blocking behavior of this

native version use the callback method instead then it can be extended.

</description>

<param name="t" type="String">

<description>Title for the new confirm dialog.</description>

</param>

<param name="cb" type="function">

<description>Callback function to be executed after the user has selected ok or cancel.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the callback in.</description>

</param>

</method>

<method name="alert" static="true" summary="Creates a alert dialog.">

<description>Creates a alert dialog. Please don't use the blocking behavior of this

native version use the callback method instead then it can be extended.

</description>

<param name="t" type="String">

<description>Title for the new alert dialog.</description>

</param>

<param name="cb" type="function">

<description>Callback function to be executed after the user has selected ok.</description>

</param>

<param name="s" type="Object">

<description>Optional scope to execute the callback in.</description>

</param>

</method>

<method name="close" static="true" summary="Closes the current window.">

<description>Closes the current window.

</description>

</method>

</members>

</class>

<members>

<property fullname="tinyMCE" name="tinyMCE" summary="Alternative name for tinymce added for 2." type="tinymce">

<description>Alternative name for tinymce added for 2.x compatibility.

</description>

<example>// To initialize editor instances

tinyMCE.init({

   ...

});</example>

</property>

</members>

</model>

