TinyMCE is a powerful WYSIWYG editor control for web browsers such as MSIE or Mozilla that enables the user to edit HTML contents in a more user friendly way. The editor control is very flexible and it's built for integration purposes for example usage within systems like Intranets, CMS, LMS and so forth.
-
- TinyMCE is developed by Moxiecode Systems AB and is currently released under the "LGPL" license, read the license agreement for details.
-
-
Features
-
-
-
Easy to integrate, takes only a couple lines of code.
-
Theme and template support.
-
Easy to extend with custom code. (Plugins and callbacks)
-
Customizable HTML output. Block elements and force attributes.
-
International language support (Language packs).
-
Multiple browser support, currently Mozilla (PC, Mac and Linux), MSIE (PC) and FireFox (PC, Mac and Linux) and some limited Safari support.
TinyMCE uses advanced JavaScript and tries to be as smart as possible when it comes to different browsers, the main focus is on Microsoft Internet Explorer and Mozilla/Firefox. The table was reset to only show the browsers we ourselves can test on. It works with many older versions of Mozilla and Firefox. Just cause a browser is not listed on this page doesn't mean it does not work, try out the examples on our website.
-
-
Since MacOS X 10.4 is more or less Linux we are not testing much on Linux any more, use the Sourceforge bug report system to submit bugs on the very latest browsers only.
These are the people, companies or organizations that have contributed in some way to the TinyMCE project. If you feel we are missing someone please inform us right away and we will correct this in future versions of TinyMCE.
-
- Please note that some of these have contributed with complete language packs and some have updated parts of language packs or similar.
-
-
-
-
-
-
-
Code / Solutions / Features
-
-
donadoni
-
Michael Keck
-
Victor Nilsson
-
Jürgen Baute
-
"Neirda"
-
"speednet"
-
Virtuelcom
-
"SlyD"
-
Ernst de Moor
-
"jamesw"
-
Vincent FIACK
-
Aptest
-
-
Language packs
-
-
Marcin Szymon Sznyra
-
"revyag"
-
Jim Kou
-
"Krokogras"
-
Hani Suleiman
-
Jan Moelgaard
-
Christopher Müller
-
Virtuelcom
-
Pavel Novák
-
Simon Rupf
-
"Fabrix Xm"
-
Mats Löfström, York Consulting AB
-
Morteza Zafari
-
Laurent Dran
-
Tobias Heer
-
"Innozent"
-
"cube316"
-
José Pedro Pereira
-
"Martin"
-
Sten Aksel Heien
-
Setzer Gabbiani
-
Jacaranda Bill
-
Pat Boens
-
Roman Filippov
-
Arnoud van Delden
-
-
-
-
There are also a few corporations that have contributed in various ways to have features developed by payed support.
-
Language packs are simply JavaScript name/value arrays placed in the ".js" files in the "lang" directory. Remember to allways use the "lang_" prefix for these value names so that they don't override other variables in the templates. The example below shows how the cut, copy and paste texts are lang packed. Notice there are three kinds of language packs the first one is the general one shared by all themes these are located in the "jscripts/tiny_mce/langs" directory the secound ones are theme specific language packs these are contained in "jscripts/tiny_mce/themes/<some theme>/langs" and the last one is plugin specific language packs located in each plugin.
-
- Remember the last translation line should not have a , character at the end. The first parameter to the addToLang is the prefix to add before each variable, this was added to reduce the overall size of the language packs to reduce the overall download time.
-
-
Files to edit
- When translating TinyMCE, these are the files that currently needs to be translated:
-
-
- Notice some language variables may include a name/url of a gif image or simmilar, for example the button for bold has a "F" character in the Swedish language pack. There are also relative window sizes located in the language packs, for example is the link dialog needs to be bigger inorder to fit a specific translation you can alter the width of the window by modifying these variables.
-
-Creating you own plugins for the TinyMCE application is fairly easy if you know the basics of HTML, CSS and Javascript. The most easy way is to copy the "_template" directory or one of the other core plugins and work from there. The "_template" directory is a tutorial plugin that shows how to create a plugin. After you copy the template you need to change the red sections marked below to the name of your plugin this is needed so that plugins don't overlap in other words it gives the plugin a unique name.
-
-
If you want you may add plugin specific options/settings but remember to namespace them in the following format "<your plugin>_<option>" for example "yourplugin_someoption".
-
Specific callback functions that you don't need or doesn't do anything can be removed.
-
-
-
Plugin directory structure
-
-
-
-
File/Directory
-
Description
-
-
-
css
Plugin specific CSS files
-
docs
Plugin specific documentation
-
images
Plugin specific images
-
jscripts
Plugin specific jscripts for HTML dialogs
-
langs
Plugin specific language files
-
editor_plugin.js
Editor plugin file (compressed).
-
editor_plugin_src.js
Editor plugin file (source).
-
somedialog.htm
Plugin specific dialog HTML file.
-
-
-
-
Plugin example source
-
-The example below shows a simple empty plugin and all possible callbacks.
-
-
-
-
-var TinyMCE_SomeNamePlugin = {
- /**
- * Returns information about the plugin as a name/value array.
- * The current keys are longname, author, authorurl, infourl and version.
- *
- * @returns Name/value array containing information about the plugin.
- * @type Array
- */
- getInfo : function() {
- return {
- longname : 'Your plugin',
- author : 'Your name',
- authorurl : 'http://www.yoursite.com',
- infourl : 'http://www.yoursite.com/docs/template.html',
- version : "1.0"
- };
- },
-
- /**
- * Gets executed when a TinyMCE editor instance is initialized.
- *
- * @param {TinyMCE_Control} Initialized TinyMCE editor control instance.
- */
- initInstance : function(inst) {
- // You can take out plugin specific parameters
- alert("Initialization parameter:" + tinyMCE.getParam("somename_someparam", false));
-
- // Register custom keyboard shortcut
- inst.addShortcut('ctrl', 't', 'lang_somename_desc', 'mceSomeCommand');
- },
-
- /**
- * Returns the HTML code for a specific control or empty string if this plugin doesn't have that control.
- * A control can be a button, select list or any other HTML item to present in the TinyMCE user interface.
- * The variable {$editor_id} will be replaced with the current editor instance id and {$pluginurl} will be replaced
- * with the URL of the plugin. Language variables such as {$lang_somekey} will also be replaced with contents from
- * the language packs.
- *
- * @param {string} cn Editor control/button name to get HTML for.
- * @return HTML code for a specific control or empty string.
- * @type string
- */
- getControlHTML : function(cn) {
- switch (cn) {
- case "SomeControl":
- return tinyMCE.getButtonHTML(cn, 'lang_someplugin_button_desc', '{$pluginurl}/images/someimage.gif', 'mceSomeCommand');
- }
-
- return "";
- },
-
- getControlHTML : function(cn) {
- switch (cn) {
- case "advhr":
- return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr');
- }
-
- return "";
- },
-
-
- /**
- * Executes a specific command, this function handles plugin commands.
- *
- * @param {string} editor_id TinyMCE editor instance id that issued the command.
- * @param {HTMLElement} element Body or root element for the editor instance.
- * @param {string} command Command name to be executed.
- * @param {string} user_interface True/false if a user interface should be presented.
- * @param {mixed} value Custom value argument, can be anything.
- * @return true/false if the command was executed by this plugin or not.
- * @type
- */
- execCommand : function(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
- case "mceSomeCommand":
- // Do your custom command logic here.
-
- return true;
- }
-
- // Pass to next handler in chain
- return false;
- },
-
- /**
- * Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable
- * button controls depending on where the user are and what they have selected. This method gets executed
- * alot and should be as performance tuned as possible.
- *
- * @param {string} editor_id TinyMCE editor instance id that was changed.
- * @param {HTMLNode} node Current node location, where the cursor is in the DOM tree.
- * @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled.
- * @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled.
- * @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables.
- * @param {boolean} any_selection Is there any selection at all or is there only a cursor.
- */
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
- },
-
- /**
- * Gets called when a TinyMCE editor instance gets filled with content on startup.
- *
- * @param {string} editor_id TinyMCE editor instance id that was filled with content.
- * @param {HTMLElement} body HTML body element of editor instance.
- * @param {HTMLDocument} doc HTML document instance.
- */
- setupContent : function(editor_id, body, doc) {
- },
-
- /**
- * Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is
- * added.
- *
- * @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified.
- */
- onChange : function(inst) {
- },
-
- /**
- * Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE
- * doesn't listen on all types of events so custom event handling may be required for
- * some purposes.
- *
- * @param {Event} e HTML editor event reference.
- * @return true - pass to next handler in chain, false - stop chain execution
- * @type boolean
- */
- handleEvent : function(e) {
- return true;
- },
-
- /**
- * Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance.
- * The type parameter contains what type of event that was performed and what format the content is in.
- * Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom.
- *
- * @param {string} type Cleanup event type.
- * @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element.
- * @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup.
- * @return New content or the input content depending on action.
- * @type string
- */
- cleanup : function(type, content, inst) {
- return content;
- },
-
- // Private plugin internal methods
-
- /**
- * This is just a internal plugin method, prefix all internal methods with a _ character.
- * The prefix is needed so they doesn't collide with future TinyMCE callback functions.
- *
- * @param {string} a Some arg1.
- * @param {string} b Some arg2.
- * @return Some return.
- * @type string
- */
- _someInternalFunction : function(a, b) {
- return 1;
- }
-};
-
-// Adds the plugin class to the list of available TinyMCE plugins
-tinyMCE.addPlugin("someplugin", TinyMCE_SomePluginPlugin);
-
-Creating you own themes for the TinyMCE application is fairly easy if you know the basics of HTML, CSS and Javascript. The most easy way is to copy the "simple" or the "advanced" template and rename it as your own name to for example "mytheme". After you copy the template you need to change the red sections marked below to "mytheme" this is needed so that themes don't overlap in other words it gives the theme a unique name. Then just alter the HTML code as you see fit but notice some elements needs to be there so check the docs below on each function also remember that your custom themes needs to be located in tiny_mce's "themes" directory. If you want you may add theme specific options/settings but remember to namespace them in the following format "theme_<your theme>_<option>".
-
-
-
Theme directory structure
-
-
-
-
File/Directory
-
Description
-
-
-
css
Theme specific CSS files
-
docs
Theme specific documentation
-
images
Theme specific images
-
jscripts
Theme specific jscripts for HTML dialogs
-
langs
Theme specific language files
-
editor_template.js
Editor theme template file (compressed).
-
editor_template_src.js
Editor theme template file (source).
-
somedialog.htm
Theme specific dialog HTML file.
-
-
-
-
Theme example source
-
-The example below shows a simple empty theme and all possible callbacks.
-
-
-
-
-var TinyMCE_SomeNameTheme = {
- /**
- * Returns information about the theme as a name/value array.
- * The current keys are longname, author, authorurl, infourl and version.
- *
- * @returns Name/value array containing information about the theme.
- * @type Array
- */
- getInfo : function() {
- return {
- longname : 'Your Theme',
- author : 'Your name',
- authorurl : 'http://www.yoursite.com',
- infourl : 'http://www.yoursite.com/docs/template.html',
- version : "1.0"
- };
- },
-
- /**
- * Gets executed when a TinyMCE editor instance is initialized.
- *
- * @param {TinyMCE_Control} Initialized TinyMCE editor control instance.
- */
- initInstance : function(inst) {
- // You can take out theme specific parameters
- alert("Initialization parameter:" + tinyMCE.getParam("somename_someparam", false));
-
- // Register custom keyboard shortcut
- inst.addShortcut('ctrl', 't', 'lang_somename_desc', 'mceSomeCommand');
- },
-
- /**
- * Returns the HTML code for a specific control or empty string if this theme doesn't have that control.
- * A control can be a button, select list or any other HTML item to present in the TinyMCE user interface.
- * The variable {$editor_id} will be replaced with the current editor instance id and {$themeurl} will be replaced
- * with the URL of the theme. Language variables such as {$lang_somekey} will also be replaced with contents from
- * the language packs.
- *
- * @param {string} cn Editor control/button name to get HTML for.
- * @return HTML code for a specific control or empty string.
- * @type string
- */
- getControlHTML : function(cn) {
- switch (cn) {
- case "SomeControl":
- return tinyMCE.getButtonHTML(cn, 'lang_sometheme_button_desc', '{$themeurl}/images/someimage.gif', 'mceSomeCommand');
- }
-
- return "";
- },
-
- /**
- * Returns the HTML code that should be inserted for a specific editor instance.
- * This function should return a name/value array with three items html, delta_width, delta_height.
- * The html item should contain the HTML code to insert as a editor instance.
- * The variable {$editor_id} will be replaced with the current editor instance id and {$themeurl} will be replaced
- * with the URL of the theme. Language variables such as {$lang_somekey} will also be replaced with contents from
- * the language packs. Any element with the id {$editor_id} will be replaced with the editor iframe element.
- * The {$width} and {$height} variables will be replaced with the editors outside dimension values.
- * The delta_width/height is the relative width/height in pixels to add or remove from the iframe dimensions.
- *
- * @param {Array} settings Name/Value array instance settings.
- * @param {string} editor_id TinMYCE editor control instance id.
- * @return Name/Value array of editor template data.
- * @type Array
- */
- getEditorTemplate : function(settings, editor_id) {
- var html = "";
-
- // Build toolbar and editor instance
- html += "..";
-
- return {
- html : html,
- delta_width : 0,
- delta_height : 0
- };
- },
-
- /**
- * Executes a specific command, this function handles theme commands.
- *
- * @param {string} editor_id TinyMCE editor instance id that issued the command.
- * @param {HTMLElement} element Body or root element for the editor instance.
- * @param {string} command Command name to be executed.
- * @param {string} user_interface True/false if a user interface should be presented.
- * @param {mixed} value Custom value argument, can be anything.
- * @return true/false if the command was executed by this theme or not.
- * @type
- */
- execCommand : function(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
- case "mceSomeCommand":
- // Do your custom command logic here.
-
- return true;
- }
-
- // Pass to next handler in chain
- return false;
- },
-
- /**
- * Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable
- * button controls depending on where the user are and what they have selected. This method gets executed
- * alot and should be as performance tuned as possible.
- *
- * @param {string} editor_id TinyMCE editor instance id that was changed.
- * @param {HTMLNode} node Current node location, where the cursor is in the DOM tree.
- * @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled.
- * @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled.
- * @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables.
- * @param {boolean} any_selection Is there any selection at all or is there only a cursor.
- */
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
- },
-
- /**
- * Gets called when a TinyMCE editor instance gets filled with content on startup.
- *
- * @param {string} editor_id TinyMCE editor instance id that was filled with content.
- * @param {HTMLElement} body HTML body element of editor instance.
- * @param {HTMLDocument} doc HTML document instance.
- */
- setupContent : function(editor_id, body, doc) {
- },
-
- /**
- * Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is
- * added.
- *
- * @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified.
- */
- onChange : function(inst) {
- },
-
- /**
- * Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE
- * doesn't listen on all types of events so custom event handling may be required for
- * some purposes.
- *
- * @param {Event} e HTML editor event reference.
- * @return true - pass to next handler in chain, false - stop chain execution
- * @type boolean
- */
- handleEvent : function(e) {
- return true;
- },
-
- /**
- * Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance.
- * The type parameter contains what type of event that was performed and what format the content is in.
- * Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom.
- *
- * @param {string} type Cleanup event type.
- * @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element.
- * @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup.
- * @return New content or the input content depending on action.
- * @type string
- */
- cleanup : function(type, content, inst) {
- return content;
- },
-
- // Private theme internal methods
-
- /**
- * This is just a internal theme method, prefix all internal methods with a _ character.
- * The prefix is needed so they doesn't collide with future TinyMCE callback functions.
- *
- * @param {string} a Some arg1.
- * @param {string} b Some arg2.
- * @return Some return.
- * @type string
- */
- _someInternalFunction : function(a, b) {
- return 1;
- }
-};
-
-// Adds the theme class to the list of available TinyMCE themes
-tinyMCE.addTheme("sometheme", TinyMCE_SomeThemeTheme);
-
-
-
-
-
-
Creating popup HTML files
-
-When creating a popup you need to include the "tiny_mce_popup.js" this enables you to retrive the tinyMCE global instance in all popup windows. All variables and language definitions gets replaced in the page when it loads. So language variables such as {$lang_something} can be places in the HTML code, if you need to get a language string in JavaScript simply use the tinyMCE.getLang function.
-
-
Example of simple popup file:
-
-
-<html>
-<head>
-<title>{$lang_theme_sample_title}</title>
-<script language="javascript" src="../../tiny_mce_popup.js"></script>
-<script language="javascript">
- // getWindowArg returns any arguments passed to the window
- alert(tinyMCE.getWindowArg('some_arg'));
-</script>
-<body>
- <strong>{$lang_theme_sample_desc}</strong>
-</body>
-
There are a few things you should check before posting questions about your problem at the forum or sourceforge.
-
-
-
Does TinyMCE work on the TinyMCE website. Then you know that TinyMCE works with your browser.
-
Try to disable any other JavaScripts on the page, some scripts interfere with internal functions that TinyMCE uses. Those scripts are probably poorly written.
-
Check that you havn't missed removing the last , character in your initialization code and that all the other rows have a trailing , character.
-
Verify that the path/URL to TinyMCE is correct, you can use the excellent tool Fiddler for this and other HTTP debugging.
-
Do not cross domain load TinyMCE or any other script unless you really really must, since this will invoke various browser security features. In other words, try placing everything on the same server.
-
Don't place textareas within paragraph elements since this is not valid HTML and it will break MSIE and TinyMCE.
-
-
-
-
-
-
-
-
Why is my paths incorrect, I want absolute/relative URLs?
-
-
- These are the diffrent configuration scenarios for URLs within TinyMCE:
-
-
-
Output
-
Config
-
Description
-
-
-
-
http://www.site.com/path1/path2/file.htm will be converted to path2/file.htm
This option will preserve the URLs as they are in a separate attribute while editing, since browsers tend to auto convert URLs.
-
-
-
-
-
-
-
-
-
-
-
Why does TinyMCE strip aways attributes or tags from my source?
-
-
You need to check out the "valid_elements" and "extended_valid_elements" option in the configuration. By default, TinyMCE only allows certain tags and attributes. TinyMCE also tries to follow the XHTML specification as much as possible (and so should you), this can cause some unexpected source changes, there are however configuration options to battle this issue, study the configuration options in details.
-
-
-
-
-
-
How do I change the default font size/face color of the editor?
-
-
- We recommend that you have a look at the content_css option, this enables you to switch the CSS file TinyMCE uses for it's editing area with a file with your CSS rules for font size and so forth.
-
-
-
-
-
-
-
How do I remove/add buttons/controls to TinyMCE?
-
-
- There are quite a few options for this but a reference of all available buttons/control names can be found in the button/control reference.
-
-
-
-
-
-
-
Why does my HTML output include lots of \" like <a href=\"mylink.htm\">link</a>?
-
-
This is probably because you are using PHP and it has a feature that's called magic quotes that is enabled by default. You can read more about this at the PHP website or use the stripslashes function.
-
-
-
-
-
-
TinyMCE takes ages to load, is there a way to make it load quicker?
-
-
- If you use PHP on your server you can use tiny_mce_gzip.php instead of tiny_mce.js in page script call. This PHP file bundles all .js files together into two HTTP requests instead of one for each plugin, language file and theme and it also GZip compresses these files.
-
-
-
-
-
-
-
TinyMCE stops working when placed in tabs or hidden divs?
-
-
Since Gecko based browsers Mozilla/Firefox has a bug where it looses designMode on iframes that are hidden a special option is needed that re-enables the design mode when reappearing after being hidden. Enable this option to resolve the issue: "auto_reset_designmode".
-
-
-
-
-
-
Can I use TinyMCE in my commercial application?
-
-
Yes you can, the LGPL license is a Free Software License. You can read the whole license here or visit Free Software Foundation web site here
-
-
-
-
-
-
Are there any restrictions to using TinyMCE in my commercial application?
-
-
- Yes, all copyright notices must be intact. Moxiecode Systems are still the copyright holders of the source code, so you can not use the code for other applications. Any modifications or add-ons you make to the source has to be contributes back to the TinyMCE community.
-
-
- If you start to make a lot of revenue from using TinyMCE, please remember the time and dedication that has been put into this by other developers, respect this and give credit to those who deserve it.
-
-
-
-
-
-
-
I don't like LGPL, is there a commercial license available for me?
-
-
- Yes, we can draw up a license for you that enables you to remove copyright restrictions or anything else you would like to have in this license agreement. Contact us through email, sales (at) moxiecode (dot) com.
-
-
-
-
-
-
-
Do you provide support?
-
-
- We do not provide any non-commercial support outside the forum on the TinyMCE web site. If you require commercial support, contact us by email, sales (at) moxiecode (dot) com.
-
-
-
-
-
-
-
Who made this software?
-
-
- The author of TinyMCE is Moxiecode Systems, parts of code has also been contributed by others, here are the credits list.
-
Installing TinyMCE is very simple, follow the instructions here. We give a few examples of to integrate TinyMCE, also look at the extensive options for configuration.
-
-
-
-
Requirements
-
-
TinyMCE has no direct requirements except for browser compatibility and of course JavaScript needs to be turned on. There is NO backend code distributed with TinyMCE.
-
On windows you could use WinZip or something similar. And on other operating systems such as Linux you simply extract the archive with the tar command. You can find a example on how to extract the archived file on Linux below.
-
- You should extract TinyMCE in your wwwroot or site domain root folder
-
-
Extract example using a shell:
-
-
-$ cd wwwroot
-$ gzip -d tinymce_1_44.tar.gz
-$ tar xvf tinymce_1_44.tar
-
Once you have extracted the archive you will need to edit the pages to include the configuration and javascript for TinyMCE. Please note that you should probably only include the TinyMCE javascript on the pages that need it, not all the pages of the web site. Remember to change the URL to the .js below to match your installation path.
-
-
The most basic page integration (converts all textarea elements into editors):
-
-
-<html>
-<head>
-<title>TinyMCE Test</title>
-<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
-<script language="javascript" type="text/javascript">
-tinyMCE.init({
- mode : "textareas"
-});
-</script>
-</head>
-<body>
-<form method="post">
- <textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
-</form>
-</body>
-</html>
-
-
-
-
- Here are a few different example of how you could integrate TinyMCE.
-
-Visit the FAQ for general answers surrounding TinyMCE. Or visit http://www.fsf.org for more information about Open-Source licenses.
-
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-.
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-.
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-.
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-.
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-.
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-.
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-.
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-.
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- If this option is set to true some accessibility focus will available to all buttons, you will be able to tab through them all. If you set this option to false, focus will be placed inside the text area when you tab through the interface.
-
-
-
-
-
Example of usage of the accessibility_focus option:
- If this option is set to true some accessibility warnings will be presented to the user if they miss specifying that information. This option is set to true default, since we should all try to make this world a better place for disabled people. But if you are annoyed with the warnings, set this option to false.
-
-
-
-
-
Example of usage of the accessibility_warnings option:
- This option enables you to turn on/off the onsubmit event listener. This feature adds a onsubmit event listener on all forms on the page, if a form is submitted a tinyMCE.triggerSave() JavaScript calls gets executed, this function moves HTML content from the editor iframe and to the hidden form element. This option is set to true by default.
-
-
-
-
-
Example of usage of the add_form_submit_trigger option:
- If you set this option to true, page contents will be stored away is the page is unloaded for example is the user navigates away from the page and then navigated back to it by pressing the back button. This option is set to true by default.
-
-
-
-
-
Example of usage of the add_unload_trigger option:
- This option enables you to add a confirmation dialog when focusing textareas. This dialog asks if the focused textarea should be converted into a editor instance or not. It will only ask once since it would get annoying otherwice. The default value of this option is "false".
-
- This option enables you to auto focus a editor instance. The value of this option should be a editor instance id. Editor instance ids are specified as "mce_editor_<index>" where index is a value starting from 0. So if there are 3 editor instances on a page these would have the following ids mce_editor_0, mce_editor_1 and mce_editor_2.
-
- This option is very useful if TinyMCE is used in a DHTML tab system or other divs that are hidden and displayed by some JavaScript. Since Mozilla has a bug when using display:none, the designMode state gets lost. To prevent this from happening you should enable this option. The default value of this option is "true".
-
-
-
-
-
Example of usage of the auto_reset_designmode option:
- This option enables you to get the TinyMCE editor area to resize to the bounderies of the contents. This option is very experimental and is set to false by default.
-
- This option should contain a comma separated list of supported browsers. This enables you to for example disable the editor while running on Safari. The default value of this option is: msie,gecko,safari,opera and since the support for Safari is very limited a warning message will appear until a better version is released. The possible values of this option is msie, gecko and safari.
-
- If this option is set to true TinyMCE will use tiled images instead of individual images for most of the editor controls. This produces faster loading time since only one GIF image needs to be loaded instead of a GIF for each individual button. This option is set to false by default since it doesn't work with some DOCTYPE declarations.
-
- This option enables you to turn on/off the built in cleanup functionality. TinyMCE is equipped with powerful cleanup functionality that enables you to specify what elements and attributes are allowed and how HTML contents should be generated. This option is set to true by default, but if you want to disable it you may set it to false. Notice: It's not recommended to disable this feature.
-
- This option enables you to add custom cleanup logic to TinyMCE. This function is called when the cleanup process is executed this process occures when the editor saves/submits content, user hits the cleanup button and when the HTML editor dialog is presented. The format of this function is: customCleanup(type, value). Where type can be "get_from_editor" when the contents is extracted from TinyMCE for example when the user submits the form. The "insert_to_editor" type value gets passed when new contents is inserted into the editor on initialization or when the HTML editor dialog commits new content. The "get_from_editor_dom" value is executed when cleanup process has a valid DOM tree and is extracted from the editor. The "insert_to_editor_dom" gets passed when the editor has a valid DOM tree and contents has been inserted into the editor. The example below illustrated all these types.
-
-
-
-
-
Example of usage of the cleanup_callback option:
-
-
-function myCustomCleanup(type, value) {
- switch (type) {
- case "get_from_editor":
- alert("Value HTML string: " + value);
-
- // Do custom cleanup code here
-
- break;
-
- case "insert_to_editor":
- alert("Value HTML string: " + value);
-
- // Do custom cleanup code here
-
- break;
-
- case "get_from_editor_dom":
- alert("Value DOM Element " + value);
-
- // Do custom cleanup code here
-
- break;
-
- case "insert_to_editor_dom":
- alert("Value DOM Element: " + value);
-
- // Do custom cleanup code here
-
- break;
- }
-
- return value;
-}
-
-tinyMCE.init({
- ...
- cleanup_callback : "myCustomCleanup"
-});
-
- This option enables you to specify a custom CSS file that extends the theme content CSS. This CSS file is the one used within the editor (the editable area). The default location of this CSS file is within the current theme.
-
If you set this option to true, all TinyMCE will convert all font elements to span elements and generate span elements instead of font elements. This option should be used inorder to get more W3C compatible code, since font elements are deprecated. How sizes gets converted can be controlled by the font_size_classes and font_size_style_values options.
This option enables you to control if TinyMCE is to be clever and restore urls to their original values. URLs are auto converted/messed up by default since the built in browser logic works this way, there is no way to get the real URL unless you store it away. If you set this option to false it will try to keep these URLs intact. This option is set to true by default that means URLs will be forced absolute or relative depending on the state of relative_urls.
- This option enables you to disable/enable the custom keyboard shortcuts plugins and themes may register. The value of this
- option is set to true by default.
-
- This option is a true/false option that enables you to disable/enable the custom undo/redo logic within TinyMCE. This option is enabled by default, if you disable it some operations may not be undoable.
-
- This option enables you to disable/enable the usage of keyboard shortcuts for undo/redo. This feature is enabled by default. Keyboard shortcurs are Ctrl+Z for undo, Ctrl+Y for redo.
-
-
-
-
-
Example of usage of the custom_undo_redo_keyboard_shortcuts option:
- This option should contain the number of undo levels to keep in memory. This is set to -1 by default and such a value tells TinyMCE to use a unlimited number of undo levels. But this steals lots of memory so for low end systems a value of 10 may be better.
-
-
-
-
-
Example of usage of the custom_undo_redo_levels option:
- This option gives you the possibility to turn on/off the restoration of the cursor/selection when a undo/redo event occurs. This option is enabled by default.
-
-
-
-
-
Example of usage of the custom_undo_redo_restore_selection option:
- If the value of this option is set to "true" some debugging information will appear such as a list of what CSS files are used. The default value of this option is false.
-
- This option enables you to specify how dialogs/popups should be opened, possible values are "window" and "modal", where the window option opens a normal window and the dialog option opens a modal dialog. This option is set to "window" by default.
-
- This option specifies the default writing direction, some languages writes from right to left instead of left to right. The default value of this option is ":ltr" but if you want to use from right to left mode specify "rtl" instead.
-
- This option should contain a language code of the editor documentation to use with TinyMCE. These codes are in ISO-639-2 format to see if your language is available check the contents of "tinymce/jscripts/tiny_mce/theme/<theme used>/docs". The default value of this option is the value specified in the "language" option or "en" for English.
-
This option enables you to specify the URL from where all URLs will be relative to this option is only used when the relative_urls option is set to true. The value of this option is set to the current document by default.
- This option enables you to specify the CSS to be used for the editor toolbars/user interface of TinyMCE this option is set to a CSS file found in the currently used theme by default. This CSS contains layout information about panels and buttons used by TinyMCE.
-
- This option enables you to specify a CSS class name that will be deselect textareas from being converted into editor instances. If this option isn't set to a value this option will not have any effect and the mode option will choose textareas instead. The default value of this option is "mceNoEditor" so if mceNoEditor is added to the class attribute of a textarea it will be excluded for convertion.
-
- This option enables you to specify a CSS class name that will be required on the text areas that is to be converted. This enables you to select specific text areas for convertion by adding this CSS class name to the class attribute of the text area. If this option isn't set to a value this option will not have any effect and the mode option will choose textareas instead. If you want all editors to be converted and just specific editors to be excluded check the editor_deselector option.
-
- This option should contain a comma separated list of element id's to convert into editor instances. This option is only used if mode is set to "exact".
-
-
-
-
-
Example of usage of the elements option:
-
-
-tinyMCE.init({
- ...
- elements : "elm1,elm2"
-});
-
- This option enables you to get XML escaped contents out of TinyMCE. Posted content will be converted to a XML string escaping characters such as < > " & to < > " &. This option is set nothing by default and is there for disabled.
-
- This option contains a comma separated list of entity names that is used instead of characters. Odd items are the character code and even items are the name of the character code. The default value of this option is placed in the example below.
-
-
-
-
-
Example of usage of the entities option / default value:
- This option controls how entities/characters gets processed by TinyMCE. The value can be set to numeric, named or raw. Where numeric is numeric representation such as " " named is entity names such as " " and raw is " ". The default value of this option is named, if named is used the entities option will be used to convert the codes into names.
-
- This option should contain a comma separated list of elements thay may have event attributes such as onclick and simmilar. This option is needed since some browsers execute these events while editing content. This option is set to "a,img" default.
-
- This option allows you to add a custom callback function for execCommand handling. This enables you to override internal
- command functions in TinyMCE. The example below shows how the mceLink and mceImage are overriden.
-
-
-
-
-
Example of usage of the execcommand_callback option:
-
-
-function myCustomExecCommandHandler(editor_id, elm, command, user_interface, value) {
- var linkElm, imageElm, inst;
-
- switch (command) {
- case "mceLink":
- inst = tinyMCE.getInstanceById(editor_id);
- linkElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "a");
-
- if (linkElm)
- alert("Link dialog has been overriden. Found link href: " + tinyMCE.getAttrib(linkElm, "href"));
- else
- alert("Link dialog has been overriden.");
-
- return true;
-
- case "mceImage":
- inst = tinyMCE.getInstanceById(editor_id);
- imageElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "img");
-
- if (imageElm)
- alert("Image dialog has been overriden. Found image src: " + tinyMCE.getAttrib(imageElm, "src"));
- else
- alert("Image dialog has been overriden.");
-
- return true;
- }
-
- return false; // Pass to next handler in chain
-}
-
-tinyMCE.init({
- ...
- execcommand_callback : "myCustomExecCommandHandler"
-});
-
- This option is very similar to valid_elements the only diffrance between this option and valid_elements is that this one gets added to the existing rule set. This can be very useful if the existing rule set is fine but you want to add some specific elements that also should be valid.
-
-
-
-
-
Example of usage of the extended_valid_elements option:
- This option enables you to have a external list of images this list of images can be generated by a server side page and then inserted into the image dialog windows of TinyMCE. The images can be to internal site images or external URLs.
-
-
-
-
-
Example of usage of the external_image_list_url option:
- This option enables you to have a external list of links this list of links can be generated by a server side page and then inserted into the link dialog windows of TinyMCE. The links can be to internal site documents or external URLs.
-
-
-
-
-
Example of usage of the external_link_list_url option:
- This option enables you to add your own file browser/image browser to TinyMCE. This function is executed each time a user clicks on the "browse" buttons in various dialogs. The format of this callback function is: fileBrowser(field_name, url, type, win) where field_name is the id/name of the form element that the browser should insert it's URL into. The url parameter contains the URL value that is currently inside the field. The type parameter contains what type of browser to present this value can be file, image or flash depending on what dialog is calling the function. The win parameter contains a reference to the dialog/window that executes the function.
-
-
-
-
-
Example of usage of the file_browser_callback option:
- This option is available since MSIE has a serious bug where the DOM tree sometimes can include the same node twice. This produces duplication of content when the cleanup process runs. This option is enabled by default and removes any duplicated nodes.
-
-
-
-
-
Example of usage of the fix_content_duplication option:
- This option enables you to specify if a "Editor is not focused" alert message should appear if the user calls tinyMCE.execCommand and havn't selected a editor instance before. This message will normaly not appear unless some integration has been made. Using tinyMCE.execInstanceCommand prevents this from happening since it auto focuses the editor specified. The default value of this option is "true".
-
Comma separated list of class names that is to be used when the user selects font sizes, this option is only used when the convert_fonts_to_spans option is enabled. This list of classes should be 7 items. This option is not used by default, but can be useful if you want to have custom classes for each font size for browser compatiblity.
Comma separated list of style values that is to be used when the user selects font sizes, this option is only used when the convert_fonts_to_spans option is enabled. This list of style values should be 7 items. This option is not used by default, but can be useful if you want to have custom CSS values for each font size for browser compatiblity. Defaults to: xx-small,x-small,small,medium,large,x-large,xx-large.
-
-
-
Example of usage of the font_size_style_values option:
- If you set this option to true, TinyMCE will force BR elements on newlines instead of inserting paragraphs. This option is set to false by default since paragraphs is a much better concept. You can style P elements to be one row by adding p { margin: 0; padding: 0; } to your CSS, P tags where invented for a reason and should be used. BR elements should only be used when you really have to (mostly never).
-
This option enables you to control TinyMCE to force the color format to use hexa decimal instead of rgb strings. It converts for example "color: rgb(255, 255, 0)" to "#FFFF00". This option is set to true by default since otherwice MSIE and Firefox would differ in this behavior.
-
-
-
Example of usage of the force_hex_style_colors option:
- This option should contain a function name to be executed each time TinyMCE intercepts and handles a event such as keydown, mousedown and so forth. The format of this function is: handleEvent(event), where inst is the editor instance object reference. If the handle event function returns false it will terminate the internal event handling.
-
-
-
-
-
Example of usage of the handle_event_callback option:
- This option gives you the ability to specify the height of the editor in pixels or percent. This height can be very userful to specify if the editor is used in hidden tabs or if the editor area should be bigger than the replaced element. The default value of this option is set to the height of the HTML element TinyMCE replaces for example the pixel height of a textarea.
-
- This option should contain a function name to be executed each time a editor instance is initialized. The format of this function is: initInstance(inst) where inst is the editor instance object reference.
-
-
-
-
-
Example of usage of the init_instance_callback option:
- If you enable the inline styles feature by setting this option to true. Most of the attributes gets converted into CSS style attributes instead. This will make the editor output more XHTML strict compatible.
-
- This callback was removed in 2.0.3, use execcommand_callback instead this also enables you to override other things than the image and link dialogs.
-
-
- This option enables you to override the built in functionality for inserting images. This option should contain a function name to be executed when a new image is inserted into TinyMCE. The format of this callback function is: insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action). Where most of these options are self explained the action can be "update" or "insert" depending on what operation type. This function should return an array with the same values as the incomming parameters, the example below describes how this is done. This option is set to a internal TinyMCE function by default.
-
-
-
-
-
Example of usage of the insertimage_callback option:
- This callback was removed in 2.0.3, use execcommand_callback instead this also enables you to override other things than the image and link dialogs.
-
-
- This option enables you to override the built in functionality for inserting links. This option should contain a function name to be executed when a new link is inserted into TinyMCE. The format of this callback function is: insertLink(href, target, title, onclick, action). Where most of these options are self explained the action can be "update" or "insert" depending on what operation type. This function should return an array with the same values as the incomming parameters, the example below describes how this is done. This option is set to a internal TinyMCE function by default.
-
-
-
-
-
Example of usage of the insertlink_callback option:
-
-
-function myCustomInsertLink(href, target, title, onclick, action) {
- var result = new Array();
-
- // Do some custom logic
- result['href'] = "some_page.htm";
- result['target'] = "_self";
- result['title'] = "Some link title";
- result['onclick'] = "";
-
- return data;
-}
-
-tinyMCE.init({
- ...
- insertlink_callback : "myCustomInsertLink"
-});
-
- This option should contain a comma separated list of element names to exclude from the content. Elements in this list will removed when TinyMCE executes a cleanup.
-
- This option should contain a language code of the language pack to use with TinyMCE. These codes are in ISO-639-2 format to see if your language is available check the contents of "tinymce/jscripts/tiny_mce/langs". The default value of this option is "en" for English.
-
-
-
- If TinyMCE doesn't have a language pack for your language you could always write your own and contribute this back to this project by uploading it as a Patch at SourceForge. A description on how to create language packs can be found in Language packs section.
-
This option enables you to specify a regexp with elements you want to exclude from parent mergeing. By default style information are attached to the parent element of a selection if all childrent/the whole element contents is selected. For example if you select a whole strong element and select a font size, the font-size style will be applied to the strong element and not with a wrapping style element. But sometimes you want to force a span element, this is where this option comes in to place. This option is set to nothing by default and applies to the font size/face/color and class drop drown lists.
-
-
-
-
Example of usage of the merge_styles_invalid_parents option:
-
-
-tinyMCE.init({
- ...
- // Excludes table cells and strong elements from any parent merge operation
- merge_styles_invalid_parents : "^TD|STRONG$"
-});
-
- This option specifies how elements is to be converted into TinyMCE WYSIWYG editor instances. This option can be set to any of the values below.
-
-
-
-
textareas
- Converts all textarea elements to editors when the page loads.
-
-
-
-
specific_textareas
- Converts all textarea elements with the a textarea_trigger attribute set to "true".
-
-
-
-
exact
- exact - Converts only explicit elements, these are listed in the elements option. These elements can be any kind for example textareas or divs.
-
-
-
-
-
- This nowrap option enables you to control how whitespace is to be wordwrapped within the editor. This option is set to false by default, but if you enable it by setting it to true editor contents will never wrap.
-
- This true/false option gives you the ability to turn on/off the inline resizing controls of tables and images in Firefox/Mozilla. These are enabled by default.
-
- This option should contain a function name to be executed each time contents is modified by TinyMCE. This function is called each time a undo level is added to TinyMCE. The format of this function is: onchange(inst), where inst is the editor instance object reference.
-
-
-
-
-
Example of usage of the onchange_callback option:
-
-
-function myCustomOnChangeHandler(inst) {
- alert("Some one modified something");
- alert("The HTML is now:" + inst.getBody().innerHTML);
-}
-
-tinyMCE.init({
- ...
- onchange_callback : "myCustomOnChangeHandler"
-});
-
- This option enables you to specify a function name to be executed when all editor instances has finished it's initialization. This is much like the onload event of a HTML page.
-
-
-
-
-
Example of usage of the oninit option:
-
-
-function myCustomOnInit() {
- alert("We are ready to rumble!!");
-}
-
-tinyMCE.init({
- ...
- oninit : "myCustomOnInit"
-});
-
- This option should contain a comma separated list of plugins. Plugins are loaded from the "tinymce/jscripts/tiny_mce/plugins" directory and the plugin name matches the name of the directory. TinyMCE is shipped with some core plugins these are described in greater detail in the Plugins reference.
-
-
- TinyMCE also supports the ability to have plugins added from a external resource, these plugins needs to be self registrering and loaded after the tinyMCE.init call. You should also prefix these plugins with a "-" character so that TinyMCE doesn't try to load it from the TinyMCE plugins directory.
-
-
-
- There are many third party plugins for TinyMCE some of these may be found under "Plugins" at SourceForge and if you have developed one of your own please contribute it to this project by uploading it to SourceForge.
-
- This option enables you to specify the CSS to be used in all popup/dialog windows within TinyMCE this option is set to a CSS file found in the currently used theme by default.
-
- If you enable this feature, whitespace such as tabs and spaces will be preserved. Much like the bahavior of a PRE element. This can be handy when integrating TinyMCE with webmail clients. This option is disabled by default.
-
If this option is set to true, all URLs returned from the MCFileManager will be relative from the specified document_base_url if it's set to false all URLs will be converted to absolute URLs. This feature can not be disabled since MSIE and FF modifies the URLs of DOM objects by them self so TinyMCE tries to solve this problem by reconverting them. This option is set to true by default.
- This option controls if linebreak characters should be removed from output HTML or not. This option is enabled by default since many backend systems use newline to <br /> convertion since they used to be plain old textarea based. With this option enables all HTML content will be placed on one line.
-
If this option is enabled the protocol and host part of the URLs returned from the MCFileManager will be removed. This option is only used if the relative_urls option is set to false. This option is set to true by default.
-
URL:s will be returned in this format: "/somedir/somefile.htm" instead of the default mode: "http://www.somesite.com/somedir/somefile.htm".
-
-
-
-
Example of usage of the remove_script_host option:
- This option enables you to add custom logic to be executed when the contents is extracted/saved. This custom logic can then modify the contents before it's submited to a serverside page. This can be useful if you want to do your own regexp cleanups and so forth. The format of this function is: saveContent(element_id, html, body). Where element id is the form element/div id of the editor and HTML is the HTML contents after the built in cleanup process has executed. This function should return the new HTML contents.
-
-
-
-
-
Example of usage of the save_callback option:
-
-
-function myCustomSaveContent(element_id, html, body) {
- // Do some custom HTML cleanup
- html = html.replace(/a/g,'b');
-
- return html;
-}
-
-tinyMCE.init({
- ...
- save_callback : "myCustomSaveContent"
-});
-
- This option enables you to execute custom setup content logic when the editor initializes. The format of this callback is:
- setupContent(editor_id, body, doc). Where editor_id is the TinyMCE editor instance id the editor instance object reference can be retrived by using tinyMCE.getInstanceById(editor_id). The body parameter is a reference to the iframes body element and doc is the iframes document element. This option is not used if it's not specified.
-
-
-
-
-
Example of usage of the setupcontent_callback option:
- This toggle option enables you to turn on/off the auto patching of the submit function in forms. TinyMCE will auto move contents from the iframe to the hidden textarea field if for example a JavaScript uses a form[0].submit() call. This is the same as using the tinyMCE.triggerSave() call. This option is set to true by default.
-
- This true/false option gives you the ability to turn on/off the inline table editing controls in Firefox/Mozilla. These controls are somewhat buggy and not redesignable so they are disabled by default.
-
-
-
-
-
Example of usage of the table_inline_editing option:
- This option enables you to specify the name of the attribute to check if it's value is true/false. If the mode option is set to "specific_textareas", only specific textareas with a attribute by the name of the value of this option gets converted and only if it's set to true. This option defaults to "mce_editable".
-
-
-
- If the mode is set to textareas and the textarea trigger attribute value is set to false, these textareas will not be converted.
-
-
-
- Notice: This option is deprecated.
- We strongly recommend you to use the editor_selector/editor_deselector options instead since they validate with W3C specifications.
-
- This option enables you to specify what theme to use when rendering the TinyMCE WYSIWYG editor instances. This name matches the directories located in "tinymce/jscripts/tiny_mce/themes". The default value of this option is "advanced". TinyMCE has three built in themes and these are described in greater detail below.
-
-
-
-
advanced
- This is the advanced theme of TinyMCE, this theme enables users to add/remove buttons and panels and is a lot more flexible than the simple or default theme. For more information about this themes specific options check the "Advanced theme" configuration section.
-
-
-
-
simple
- This is the most simple theme for TinyMCE it contains only the basic functions.
-
-
-
-
-
- This option should contain a comma separated list of block formats the default value of this option is "p,div,address,pre,h1,h2,h3,h4,h5,h6". This option is only available if the advanced theme is used.
-
-
-
-
-
Example of usage of the theme_advanced_blockformats option:
- This option should contain a comma separated list of button/control names to insert into the toolbar. The number 1-n is the row number to insert the buttons/controls to. Below is a list of built in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins.
- This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".
-
-
- A complete reference of all built in buttons and controls can be found in the button/control reference page.
-
-
-
-
-
Example of usage of the theme_advanced_buttons<1-n> option:
- This option should contain a comma separated list of button/control names to add to the end of the specified toolbar row. The number 1-n is the row number to add the buttons/controls to. Below is a list of built in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins.
- This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".
-
-
- A complete reference of all built in buttons and controls can be found in the button/control reference page.
-
-
-
-
-
Example of usage of the theme_advanced_buttons<1-n>_add option:
- This option should contain a comma separated list of button/control names to add to the beginning of the specified toolbar row. The number 1-n is the row number to add the buttons/controls to. Below is a list of built in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins.
- This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".
-
-
- A complete reference of all built in buttons and controls can be found in the button/control reference page.
-
-
-
-
-
Example of usage of the theme_advanced_buttons<1-n>_add_before option:
- This option should contain buttons/control that you wich to insert into the container, the button names available is the same as in the theme_advanced_buttons_<1-3> option but two extra controls available when this layout option is used these are "mceEditor" and "mceElementpath". The <container> part of this option should be replaced with a name within the theme_advanced_containers list. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the value of "RowLayout".
-
-
-
-
-
Example of usage of the theme_advanced_container_<container> option:
- This option is used to set the alignment of a specific containerer. The <container> part of this option should be replaced with a name within the theme_advanced_containers list. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the value of "RowLayout".
-
-
-
-
-
Example of usage of the theme_advanced_container_<container>_align option:
- This option is used to set the class of a specific container. The <container> part of this option should be replaced with a name within the theme_advanced_containers list. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the value of "RowLayout".
-
-
-
-
-
Example of usage of the theme_advanced_container_<container>_class option:
- This option should contain a comma separated list of container/panel names. These names are then matched agains the other container options. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the value of "RowLayout".
-
-
-
-
-
Example of usage of the theme_advanced_containers option:
- This option should contain the default container/panel alignment this can be a value of "left", "center" or "right". This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the value of "RowLayout".
-
-
-
-
-
Example of usage of the theme_advanced_containers_default_align option:
- This option should contain the default container/panel class name. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the value of "RowLayout".
-
-
-
-
-
Example of usage of the theme_advanced_containers_default_class option:
- This option is used to specify a custom layout manager function. The format of this function is: customLayout(template) where template is the template array within the advanced theme, this function should return a new template array containing the editor HTML in a key called html. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the value of "RowLayout".
-
- CustomLayout
-
- template
-
-
-
-
-
Example of usage of the theme_advanced_custom_layout option:
- This option should contain a semicolon separated list of font titles and font families separated by =. The titles are the ones that get presented to the user in the fonts drop down list and and the font family names is the string that gets inserted into the font face or fontFamily CSS style.
-
-
-
-
-
Example of usage of the theme_advanced_fonts option:
- This option enables you to switch button and panel layout functionality. There are three diffrent layout manager options
- SimpleLayout that is the default layout manager, RowLayout that is the more advanced manager and finaly CustomLayout that executes a custom layout manager function. Each of these layout managers have diffrent options and can be configurated in diffrent ways. This option is only available if the advanced theme is used.
-
-
-
-
-
Example of usage of the theme_advanced_layout_manager option:
- This option should contain a semicolon separated list of link target titles and target names separated by =. The titles are the ones that get presented to the user in the link target drop down list and and the target names is the target that gets inserted as a target attribute.
-
-
-
-
-
Example of usage of the theme_advanced_link_targets option:
- This option gives you the ability to enable/disable the element path. This option is only useful if the theme_advanced_statusbar_location option is set to "top" or "bottom". This option is set to true by default.
-
-
-
-
-
Example of usage of the theme_advanced_path option:
- This option enables you to specify where the element path should be located. This option can be set to "top", "bottom" or "none". The default value is set to "none". This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".
-
-
-
-
-
Example of usage of the theme_advanced_path_location option:
- This option gives you the ability to enable/disable the horizontal resizing. This option is only useful if the theme_advanced_statusbar_location option is set to "top" or "bottom" and when the theme_advanced_resizing is set to true. This option is set to true by default, that makes resizing horizontal and vertical.
-
-
-
-
-
Example of usage of the theme_advanced_resize_horizontal option:
- This option gives you the ability to enable/disable the resizing button. This option is only useful if the theme_advanced_statusbar_location option is set to "top" or "bottom". This option is set to false by default.
-
-
-
-
-
Example of usage of the theme_advanced_resizing option:
- This option enables you to specify where the element statusbar with the path and resize tool should be located. This option can be set to "top", "bottom" or "none". The default value is set to "none". This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".
-
-
-
-
-
Example of usage of the theme_advanced_statusbar_location option:
- This option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted. If this option isn't defined TinyMCE auto imports the classes from the content CSS.
-
-
-
-
-
Example of usage of the theme_advanced_styles option:
- This option enables you to specify the alignment of the toolbar, this value can be left, right or center the default value is center. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".
-
-
-
-
-
Example of usage of the theme_advanced_toolbar_align option:
- This option enables you to specify where the toolbar should be located. This option can be set to "top" or "bottom". The default value is set to "bottom". This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".
-
-
- There is a special "external" location, this option adds the toolbar to a DIV element and sets the class of this DIV to "mceToolbarExternal". This enables you to freely specify the location of the toolbar.
-
-
-
-
-
Example of usage of the theme_advanced_toolbar_location option:
- This option enable you to add your own URL converter logic. This option should contain a JavaScript function name. The format of this converter function is: URLConverter(url, node, on_save). There URL is the URL string to convert, node is the element that contains the URL that is to be converted this parameter may be set to null if there is no element for the URL and on_save is set to true when contents is to be extracted from the editor for example when the user submits the HTML form. This function should return the converted URL as a string. This option is set to a internal TinyMCE function "TinyMCE.prototype.convertURL" by default. You may call this function from your extention inorder to use the built in convert options.
-
-
-
-
-
Example of usage of the urlconverter_callback option:
- This option should contain a comma separated list element convertion chunks. Each chunk contains information about how one element and it's attributes should be treated. The default rule set for this option is specified below.
-
-
-
-
-
Control characters:
-
-
,
Separates element chunk definitions.
-
/
Separates element synonymous. The first element is the one that will be outputted.
-
|
Separates attribute definitions.
-
[
Starts a new attribute list for a element definition.
-
]
Ends a attribute list for a element definition.
-
=
Makes the attribute to default to the specified value. For example "target=_blank"
-
:
Makes the attribute to be forced to the specified value. For example "border:0"
-
<
Verifies the value of a attribute. For example "target<_blank?_self"
-
?
Separates attribute verification values, see above.
-
+
Makes the element open if no child nodes exists. Example: +a.
-
-
Enables removal of empty elements such as >strong /<. Example: -strong.
-
#
Enables padding of empty elements, this will padd with if they are empty. Example: #p.
-
-
- Wildcards such as *,+,? may be used in element or attribute name matching.
-
-
- Special variables:
- {$uid} Results in a unique ID. For example "p[id:{$uid}]".
-
- Use *[*] to include all elements and all attributes this can be very useful when used with the invalid_elements option.
-
-
-
-
-
Example of usage of the valid_elements option:
-
- This example string tells TinyMCE to remove all elements that are not a "a, strong, div or br" element, convert b elements to strong elements, default target to "_blank" and keep the href, target and align attributes of the elements.
-
- If you enable this function, class names placed in class attributes will be verified agains the content CSS. So elements with a class attribute containing a class that doesn't exist in the CSS will be removed.
-
-
-
-
-
Example of usage of the verify_css_classes option:
- This option enabled or disables the element cleanup functionality. If you set this option to false, all element cleanup will be skipped but other cleanup functionality such as URL convertion will still be executed.
-
- This true/false option gives you the ability to turn on/off the visual aid for border less tables. If a the border of a table is set to 0 TinyMCE adds a dotted line around the table by default.
-
- This option enables you to specify what CSS class to use for presenting visual aids for border less tables. The default value of this option is set to "mceVisualAid".
-
-
-
-
-
Example of usage of the visual_table_class option:
- This option gives you the ability to specify the width of the editor in pixels or percent. This width can be very useful to specify if the editor is used in hidden tabs or if the editor area should be bigger than the replaced element. The default value of this option is set to the width of the HTML element TinyMCE replaces for example the pixel width of a textarea.
-
This is a more advanced image dialog mostly based on code contributed by Michael Keck. This one supports mouseover/out image swapping.
-
-
Installation Instructions
-
-
-
Copy the advimage directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
-
Add plugin to TinyMCE plugin option list example: plugins : "advimage".
-
Add this "a[name|href|target|title|onclick]" to extended_valid_elements option.
-
-
-
-
-
-
Advimage plugin options
-
-
advimage_styles
This option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
-
advimage_update_dimensions_onchange
This option enables you to control if the image dimensions should be updated with new data if the image src field is changed. This option is enabled by default.
This is a more advanced link dialog mostly based on code contributed by Michael Keck. This link plugin supports popup windows and targets.
-
-
Installation Instructions
-
-
-
Copy the advlink directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
-
Add plugin to TinyMCE plugin option list example: plugins : "advlink".
-
Add this "a[name|href|target|title|onclick]" to extended_valid_elements option.
-
-
-
-
-
Advlink plugin options
-
-
advlink_styles
This option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
This plugin gives the user a warning if they made modifications to a editor instance but didn't submit them. This plugin will most likely be extended in the future to provide AJAX auto save support.
- These emotions where taken from Mozilla Thunderbird. I hope they don't get angry if I use them here after all this is a open source project aswell and I realy love their product.
-
This is the "Insert Flash" Dialog, it enables users to insert flash movies into TinyMCE.
-
You can control the wmode, quality and menu by setting the flash_wmode, flash_quality and flash_menu options.
-
-
Installation Instructions
-
-
-
Copy the flash directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
-
Add plugin to TinyMCE plugin option list example: plugins : "flash".
-
Add this "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]" to extended_valid_elements option.
-
Add the flash button name to button list, example: theme_advanced_buttons3_add : "flash".
-
-
-
Initialization Example
-
-
-
-tinyMCE.init({
- theme : "advanced",
- mode : "textareas",
- plugins : "flash",
- extended_valid_elements : "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]"
- flash_external_list_url : "example_flash_list.js", // Optional URL to a list of SWF movies
- flash_wmode : "transparent",
- flash_quality : "high",
- flash_menu : "false"
-});
-
-
-
-
-
-
Additional note
-
- The flash plugin has been heavily modified (the original is editor_plugin_original.js) since the original did not play nicely with html content that already contained existing flash tags and in fact stripped out the object
- tags for existing flash html. The rewrite corrects this as well attempts
- to preserve the existing flash tags where possible. The tinyMCE.init call
- should be be something like:
-
Note the extra obj,param,embed attributes for the img tag. These attributes
- are used to serialize data from existing flash tags so that they can be
- properly restored. Editing a flash tag with the plugin will cause this
- information to be lost (sorry!) but still produces a working flash nevertheless.
-
This plugin adds fullpage editing support. This enables you to edit whole documents with both head and body.
-
-
Installation Instructions
-
-
-
Add plugin to TinyMCE plugin option list example: plugins : "fullpage".
-
Add the fullpage button name to button list, example: theme_advanced_buttons3_add : "fullpage".
-
-
-
-
-
Options
-
-
-
-
-
[fullpage_doctypes]
-
This is a name/value list of possible document types. The value format of this option is name=value,name=value. These document types will be presented in the document type selection list. The default value of this option is: XHTML 1.0 Transitional=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,XHTML 1.0 Frameset=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">,XHTML 1.0 Strict=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">,XHTML 1.1=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">">,HTML 4.01 Transitional=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">,HTML 4.01 Strict=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">,HTML 4.01 Frameset=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">.
-
-
-
[fullpage_fonts]
-
This option enables you specify what font family style values that can be added to the body element. The value format of this option is name=value;name=value. The default value of this option is: Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings
-
-
-
-
[fullpage_fontsizes]
-
This is a comma separated list of possible font sizes for the style attribute of the body element. This option defaults to: 10px,11px,12px,13px,14px,15px,16px.
-
-
-
-
[fullpage_encodings]
-
This option enables you to specify what the document character encoding sets the user may select from. The default value of this option is: Western european (iso-8859-1)=iso-8859-1,Central European (iso-8859-2)=iso-8859-2,Unicode (UTF-8)=utf-8,Chinese traditional (Big5)=big5,Cyrillic (iso-8859-5)=iso-8859-5,Japanese (iso-2022-jp)=iso-2022-jp,Greek (iso-8859-7)=iso-8859-7,Korean (iso-2022-kr)=iso-2022-kr,ASCII (us-ascii)=us-ascii
-
-
-
-
[fullpage_default_doctype]
-
This option enables you to specify the default doctype for the output HTML.
-
-
-
[fullpage_default_encoding]
-
This option enables you to specify the default encoding for the output HTML.
-
-
-
[fullpage_default_title]
-
This option enables you to specify the default title for the output HTML.
-
-
-
[fullpage_default_font_size]
-
This option enables you to specify the default font size for body element.
-
-
-
[fullpage_default_font_family]
-
This option enables you to specify the default font family for body element.
-
-
-
[fullpage_default_text_color]
-
This option enables you to specify the default text color for body element.
-
-
-
[fullpage_default_langcode]
-
This option enables you to specify the default langcode for the output HTML.
-
-
-
[fullpage_default_xml_pi]
-
This option enables you to specify if a XML declaration should be added or not true/false option.
This plugin makes all dialogs to open as floating DIV layers instead of popup windows. This option can be very useful inorder to get around popup blockers. This plugin should be treated as experimental since it's not 100% compatible yet.
- plugin_insertdate_dateFormat - Format that the date is output as. Defaults to: "%Y-%m-%d".
- plugin_insertdate_timeFormat - Format that the time is output as. Defaults to: "%H:%M:%S".
-
-
Replacement variables
-
-
-
-
%y
-
year as a decimal number without a century (range 00 to 99)
-
-
-
%Y
-
year as a decimal number including the century
-
-
-
%d
-
day of the month as a decimal number (range 01 to 31)
-
-
-
%m
-
month as a decimal number (range 01 to 12)
-
-
-
%D
-
same as %m/%d/%y
-
-
-
%r
-
time in a.m. and p.m. notation
-
-
-
%H
-
hour as a decimal number using a 24-hour clock (range 00 to 23)
-
-
-
%I
-
hour as a decimal number using a 12-hour clock (range 01 to 12)
-
-
-
%M
-
minute as a decimal number (range 00-59)
-
-
-
%S
-
second as a decimal number (range 00-59)
-
-
-
%p
-
either "am" or "pm" according to the given time value
Adds non editable elements support for MSIE and Mozilla/FF. Any element with the "mceItemNonEditable" class will be blocked from modifications and treated as a single character. This class name is configurable using the "noneditable_noneditable_class". Any elements with the MSIE specific attribute "contenteditable" will be converted into classes instead.
Class name to be used for editable elements, this would be the the same as contenteditable=true, forcing a element to be editable. This option defaults to: "mceItemEditable". Notice that classes with the mceItem prefix is invisible within TinyMCE.
-
-
-
[noneditable_noneditable_class]
-
Class name to be used for non editable elements, this would be the same as contenteditable=false. This option defaults to: "mceItemNonEditable". Notice that classes with the mceItem prefix is invisible within TinyMCE.
-
-
-
[noneditable_leave_contenteditable]
-
If the value of this option is set to true, all contenteditable attributes will be left intact. This option is set to false by default, since this attribute is not a valid W3C attribute and the class approach is better.
This plugin adds paste as plain text and paste from Word icons to TinyMCE. This plugin was developed by Ryan Demmer and modified by the TinyMCE crew to be more general and some extra features where added.
-
- On 25 May 2005, this plugin was modified by speednet: IE now pastes directly into the editor, bypassing the extra steps of opening the Insert box, selecting options, and clicking Insert. Speednet also added the Select All command, which highlights all the content in the editor when the user clicks the toolbar button (Other miscellaneous cleanup also).
-
-
On 28 October 2005, this plugin was modified by monkeybrain: Added the paste_strip_class_attributes option.
-
Installation Instructions
-
-
-
Copy the paste directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
-
Add plugin to TinyMCE plugin option list example: plugins : "paste".
-
Add the button names to button list, example: theme_advanced_buttons3_add : "pastetext,pasteword,selectall".
-
-
-
Initialization Example
-
-
-
-tinyMCE.init({
- theme : "advanced",
- mode : "textareas",
- plugins : "paste",
- theme_advanced_buttons3_add : "pastetext,pasteword,selectall",
- paste_create_paragraphs : false,
- paste_create_linebreaks : false,
- paste_use_dialog : true,
- paste_auto_cleanup_on_paste : true,
- paste_convert_middot_lists : false,
- paste_unindented_list_class : "unindentedList",
- paste_convert_headers_to_strong : true,
- paste_insert_word_content_callback : "convertWord"
-});
-
-function convertWord(type, content) {
- switch (type) {
- // Gets executed before the built in logic performes it's cleanups
- case "before":
- content = content.toLowerCase(); // Some dummy logic
- break;
-
- // Gets executed after the built in logic performes it's cleanups
- case "after":
- content = content.toLowerCase(); // Some dummy logic
- break;
- }
-
- return content;
-}
-
-
-
-
-
Options
-
-
-
-
-
[paste_create_paragraphs]
-
If enabled double linefeeds are converted to paragraph elements when using the plain text dialog. This is enabled by default.
-
-
-
[paste_create_linebreaks]
-
If enabled single linefeeds are converted to hard line break elements when using the plain text dialog. This is enabled by default.
-
-
-
[paste_use_dialog]
-
MSIE specific option, if you set this to true both Mozilla and MSIE will present a paste dialog. If you set it to false pasting in MSIE will be done directly. This option is set to false by default.
-
-
-
[paste_auto_cleanup_on_paste]
-
MSIE specific option. If you enable this feature, a word paste will be executed when the user copy/paste content to the editor. This feature is disabled by default.
-
-
-
[paste_convert_middot_lists]
-
If this feature is enabled middot lists are converted into UL lists, these will be assign a special class.
-
-
-
[paste_unindented_list_class]
-
This option enables you to specify what class to assign to the UL list of middot converted lists. Middot lists are unindented in MS Office. This option defaults to "unIndentedList".
-
-
-
[paste_convert_headers_to_strong]
-
This feature converts H1-6 elements to strong elements on paste, this is feature is disabled by default.
-
-
-
[paste_remove_spans]
-
This enables you to control if the word parse operation should remove or keep span elements, they will be removed by default.
-
-
-
[paste_remove_styles]
-
This enables you to control if the word parse operation should remove or keep style attributes, they will be removed by default.
-
-
-
[paste_replace_list]
-
Comma separated list of search/replace chunks. Where even items is the regexp that is to be used for the search and odd values are the contents that are to be replaced.
-
This option defaults to: "\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-" this list replaces some custom MS 1250 characters.
-
- The \uXXXX values is the hex values of the Unicode characters. Trick use javascript:alert('<unicode char>'.charCodeAt(0).toString(16)); to retive these numbers.
-
-
-
[paste_strip_class_attributes]
-
This feature allows you to control whether or not class attributes are stripped when using pasteword. Valid values are:
-
-
all - will strip all class attributes from the pasted content. This is the default value.
-
none - will not strip any class attributes from the pasted content.
-
mso - will strip out all of the class attribute values that start with "Mso", but retain all others.
-
-
-
-
-
[paste_insert_word_content_callback]
-
This option enables you to specify a callback function. This callback is executed when the user pastes word content, the return value of this function will be the new content string. Check the example above for more details.
-
- This plugin adds table management functionality to TinyMCE.
-
-
-
-
-
Table controls/buttons
-
-
tablecontrols
All table control below and some separators between them.
-
table
Insert table control.
-
row_props
Edit row properties (tr).
-
cell_props
Edit cell properties (td).
-
delete_col
Delete column control.
-
delete_row
Delete row control.
-
col_after
Column after control.
-
col_before
Column before control.
-
row_after
Row after control.
-
row_before
Row before control.
-
row_after
Row after control.
-
row_before
Row before control.
-
split_cells
Splits a merged cell into rows and columns.
-
merge_cells
Mergers selected cells into one cell.
-
-
-
-
-
-
-
Table commands to use with execCommand
-
-
mceInsertTable
Inserts a new table at cursor location the default size is 2x2. If the value parameter is specified it should contain a name/value array, this array has the following options cols, rows, border, cellspacing, cellpadding. The default border is set to: 0.
-
mceTableInsertRowBefore
Inserts a row before/above the current cursor location.
-
mceTableInsertRowAfter
Inserts a row after/under the current cursor location.
-
mceTableDeleteRow
Deletes the row at the current cursor location.
-
mceTableInsertColBefore
Inserts a column before the current cursor location.
-
mceTableInsertColAfter
Inserts a column after the current cursor location.
-
mceTableDeleteCol
Deletes the column at the current cursor location.
-
-
-
-
-
-
-
Options
-
-
table_styles
This option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
-
table_cell_styles
This option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
-
table_row_styles
This option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
-
-
-
-
-
-
Installation Instructions
-
-
-
Add plugin to TinyMCE plugin option list example: plugins : "directionality".
-
Add the ltr, rtl button names to button list, example: theme_advanced_buttons3_add : "ltr,rtl".
Inorder to initialize the TinyMCE the following code must be placed within HEAD element of a document. The following example is configurated to convert all TEXTAREA elements to into editors when the page loads, there are other modes as well.
-Makes a cleanup and moves the contents from the editor to the form field. This method is automaticly called by tinyMCE by adding a trigger on the forms submit method.
-
-
-
-
-
-
Parameters
-
-
-
-
-
[skip_cleanup]
-
Disables the cleanup process of trigger save. Defaults to false. (Optional)
-
-
-
[skip_callback]
-
Disables the execution of the save_callback function. Defaults to false. (Optional)
-
-
-
-
-skip_callback
-
-
-Returns: Nothing
-
-
-
tinyMCE.updateContent(form_element_name);
-
-Moves the contents from the form element to the editor, this does the opposite of triggerSave(). This method can be used when you want to change the contents of the editor dynamicly.
-
-
-
-
-
-
Parameters
-
-
-
-
-
form_element_name
-
The name of the form element to get contents from.
-This method executes a command by name on the selected editor instance.
-
-
-
-
-
-
Parameters
-
-
-
-
-
command
-
Command to execute for example "Bold" or "Italic". These are defined by Mozilla Midas specification or Microsoft specification. But there are a some TinyMCE specific commands many other commands are available within plugins and themes.
-
-
-
mceLink
-
Opens the insert link dialog and inserts a link.
-
-
-
mceImage
-
Opens the insert image dialog and inserts a image.
-
-
-
mceCleanup
-
Removed unwanted elements and attributes from the HTML code.
-
-
-
mceHelp
-
Opens the manual pages.
-
-
-
mceAddControl
-
Adds a editor control to the element id/name specified as value.
-
-
-
mceRemoveControl
-
Removes a specific control by editor_id name. The value is the editor_id to remove, editor ids are in the following format: "mce_editor_<index>". DOM element ids and form element names can allso be used.
-
-
-
mceFocus
-
Focuses the editor by the id placed in value. Editor id's are in the format "mce_editor_". DOM element ids and form element names can allso be used.
-
-
-
mceSetCSSClass
-
Sets the CSS class attribute or creates a new span of the selection. The value is the css class name to assign to selected element or new span element.
-
-
-
mceInsertContent
-
Inserts contents of value parameter to current cursor position.
-
-
-
mceReplaceContent
-
Replaces the current selection with the HTML code in value. The {$selection} variable gets replaced with the currently selected text contents.
-
-
-
mceSetAttribute
-
Sets a attribute of the currenly selected element. The value of this command should be a name/value array with the following parameters.
- name - Attribute name to set.
- value - Attrbute value to set.
- [targets] - Target elements to add attribute on. Default: p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address.
- Example of usage:
- tinyMCE.execCommand('mceSetAttribute',false,{name:'align',value:'right'});
-
-
-
-
mceToggleVisualAid
-
Toggles visual aid/guidelines mode on/off.
-
-
-
mceAnchor
-
Inserts a named anchor element, the value is the name of the anchor.
-
-
-
mceResetDesignMode
-
Resets the designMode state of all editor instances, this command is useful on Firefox if the editor is placed in tabs or shown/hidden with style.display="none/block". Call this command after the editor displayed again.
-
-
-
mceSelectNode
-
Selects the node/element passed as value. This command will also scroll to the elements location within the editor.
-
-
-
mceSelectNodeDepth
-
Selects the node/element by depth relative from the current node. So a value of 0 will select the currently focused node. This command will also scroll to the elements location within the editor.
-
-
-
mceRemoveNode
-
Removes the specified node and places the contents of the node in the same location. Specify the node reference to remove in the value parameter or null if the currently selected node is to be removed.
-
-
-
-
-
-
-
-
-
-
-
[user_interface]
-
Tells if the command is to display a user interface or not. True/False option.
-
-
-
[value]
-
Value to pass for the command for example to insertLink it's the URL of the link.
This method is deprecated and removed as of 2.0.3. Use tinyMCE.execCommand('mceInsertContent',false,'custom html'); instead and tinyMCE.getInstanceById('<inst>').selection.getFocusElement() to retrive/update the selected element.
-
But if you realy need the old function it's marked internal but is available in the advanced theme and you can call it by using tinyMCE.themes['advanced']._insertLink(href, target);. But the recommended way is to modify your code to use the logic above.
-
This method inserts a link a the cursor position of the selected editor instance or updates the selected link with new data. This method should be called upon "ok" in the insertLink popup when you create custom themes.
-
This method is deprecated and removed as of 2.0.3. Use tinyMCE.execCommand('mceInsertContent',false,'custom html'); instead or if you realy need the old function it's marked internal but is available in the advanced theme and you can call it by using tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout);. But the recommended way is to modify your code to use the logic above.
-
-This method inserts a image a the cursor position of the selected editor instance or updates the selected image with new data. This method should be called upon "ok" in the insertImage popup when you create custom themes.
-
-
-
-
-
Parameters
-
-
-
-
-
src
-
Image src url.
-
-
-
alt
-
Alternative text of img element.
-
-
-
border
-
Border of image element.
-
-
-
hspace
-
Horizontal spacing of image element.
-
-
-
vspace
-
Vertical spacing of image element.
-
-
-
width
-
Width of image element.
-
-
-
height
-
Height of image element.
-
-
-
align
-
Alignment of image element.
-
-
-
title
-
Link title of image element.
-
-
-
onmouseover
-
On mouse over event handler of image element.
-
-
-
onmouseout
-
On mouse out event handler of image element.
-
-
-
-
-Returns: Nothing
-
-
-
tinyMCE.triggerNodeChange();
-
This method is to be called when external changes is made to the editor. This method will then call the "handleNodeChangeCallback" callback in the theme.
-
-
-Parameters:
-
-
-None
-
-
-Returns: Nothing
-
-
-
tinyMCE.getContent();
-
-This method returns the HTML contents of the currently selected editor or null if no editor was selected.
-
-
-Parameters:
-
-
-None
-
-
-Returns: HTML contents of the currently selected editor or null.
-
-
-
Syntax: tinyMCE.setContent(html);
-
-
This method sets the HTML contents of the currently selected editor.
-
-
-
-
-
-
Parameters
-
-
-
-
-
html
-
HTML Source code to set.
-
-
-
-
-
-Returns: None.
-
-
-
tinyMCE.getInstanceById(editor_id);
-
-This method returns a editor instance by editor id.
-
-This method imports/loads plugin specific language packs. This may be called from custom plugins.
-
-
-
-
-
-
Parameters
-
-
-
-
-
plugin
-
Name of the current plugin.
-
-
-
valid_languages
-
Comma separated list of supported languagepacks.
-
-
-
-
-
-Returns: None.
-
-
-
tinyMCE.applyTemplate(html);
-
-This method replaces settings and lang variables in the theme.
-
-
-
-
-
-
Parameters
-
-
-
-
-
html
-
HTML code to apply theme variable substitution on.
-
-
-
-
-
-Returns: New converted, HTML code.
-
-
-
tinyMCE.openWindow(template, [args]);
-
This method opens a new window by the template data assigned, it will get the width, height and html data from template parameters. The args array contains variable names to be substituted.
-
-There are some custom window arguments:
-
-
-
-
-
-
Parameters
-
-
-
-
-
mce_replacevariables
-
Enables/Disables the language/variable replacement of the document HTML. Enabled by default.
-
-
-
mce_windowresize
-
Enables/Disables the auto resize feature of popupwindows. Enabled by default.
-
-
-
-
-
-
-
-
-
-
Parameters
-
-
-
-
-
template
-
Name/Value array with width, height, html and file keys in it.
-
-
-
[args]
-
Name/Value array with variable names to replace. Variables in the template file key value (URL) gets replaced with the argument list.
-
-
-
-
-
-Returns: None.
-
-
-
tinyMCE.getWindowArg(name, [default_value]);
-
-This method returns a window argument defined by name. This function is to be used in theme popup windows to retrive dialog parameters.
-
-
-
-
-
-
Parameters
-
-
-
-
-
name
-
Name of window argument to get.
-
-
-
[default_value]
-
Default value to be returned if window argument is missing.
-
-
-
-
-
-Returns: Window argument value.
-
-
-
tinyMCE.setWindowArg(name, value);
-
This method sets a window argument by name. This can for example be useful if plugin are to call other plugins.
Here are some information about the different plugins.
-
-
-
-
Plugins
-
-
To use a plugin, you need to use the advanced theme and add the plugin name in the "plugin" comma seperated line. You also need to add the button to the interface, read more about the advanced plugin to configure this.
-
-
- addRuleStr(<string> s)
-
-
-
- Adds a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3].
-
-
-
-
-
-
- string
-
-
-
-
-
- formatHTML(<string> h)
-
-
-
- Applies source formatting/indentation on the specified HTML string.
-
-
-
-
-
-
- void
-
-
-
-
-
- init(<Array> s)
-
-
-
- Initializes the cleanup engine with the specified config.
-
-
-
-
-
-
- Array
-
-
-
-
-
- parseRuleStr(<string> s)
-
-
-
- Parses a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3].
-
-
-
-
-
-
- string
-
-
-
-
-
- serializeNodeAsHTML(<HTMLNode> n)
-
-
-
- Serializes the specified node as a XHTML string.
-
-
-
-
-
-
- string
-
-
-
-
-
- serializeNodeAsXML(<HTMLNode> n)
-
-
-
- Serializes the specified node as a HTML string.
-
-
-
-
-
-
- string
-
-
-
-
-
- split(<RegEx> re, <string> s)
-
-
-
- Splits the specified string and removed empty chunks.
-
-
-
-
-
-
- string
-
-
-
-
-
- xmlEncode(<string> s)
-
-
-
- XML Encodes the specified string based on configured entity encoding.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Constructor Detail
-
-
-
-
-
-TinyMCE_Cleanup
-
TinyMCE_Cleanup()
-
-
-
- TinyMCE_Cleanup class.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Method Detail
-
-
-
-
-
-
-
-
addRuleStr
-
void addRuleStr(<string> s)
-
-
Adds a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3].
- These rules are then used when serializing the DOM tree as a HTML string, it gives the possibility
- to control the valid elements and attributes and force attribute values or default them.
-
-
-
-
-
- Parameters:
-
-
s - Rule string to parse and add to the cleanup rules array.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
formatHTML
-
string formatHTML(<string> h)
-
-
Applies source formatting/indentation on the specified HTML string.
-
-
-
-
-
- Parameters:
-
-
h - HTML string to apply formatting to.
-
-
-
-
-
-
-
-
- Returns:
-
- Formatted HTML string.
-
-
-
-
-
-
-
-
-
-
-
init
-
void init(<Array> s)
-
-
Initializes the cleanup engine with the specified config.
-
-
-
-
-
- Parameters:
-
-
s - Name/Value array with config settings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
parseRuleStr
-
Array parseRuleStr(<string> s)
-
-
Parses a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3].
- These rules are then used when serializing the DOM tree as a HTML string, it gives the possibility
- to control the valid elements and attributes and force attribute values or default them.
-
-
-
-
-
- Parameters:
-
-
s - Rule string to parse as a name/value rule array.
-
-
-
-
-
-
-
-
- Returns:
-
- Parsed name/value rule array.
-
-
-
-
-
-
-
-
-
-
-
serializeNodeAsHTML
-
string serializeNodeAsHTML(<HTMLNode> n)
-
-
Serializes the specified node as a XHTML string. This uses the TinyMCE serializer logic since it gives more
- control over the output than the build in browser XML serializer.
-
-
-
-
-
- Parameters:
-
-
n - Node to serialize as a XHTML string.
-
-
-
-
-
-
-
-
- Returns:
-
- Serialized XHTML string based on specified node.
-
-
-
-
-
-
-
-
-
-
-
serializeNodeAsXML
-
string serializeNodeAsXML(<HTMLNode> n)
-
-
Serializes the specified node as a HTML string. This uses the XML parser and serializer
- to generate a XHTML string.
-
-
-
-
-
- Parameters:
-
-
n - Node to serialize as a XHTML string.
-
-
-
-
-
-
-
-
- Returns:
-
- Serialized XHTML string based on specified node.
-
-
-
-
-
-
-
-
-
-
-
split
-
string split(<RegEx> re, <string> s)
-
-
Splits the specified string and removed empty chunks.
-
-
-
-
-
- Parameters:
-
-
re - RegEx to split string by.
-
-
-
s - String value to split.
-
-
-
-
-
-
-
-
- Returns:
-
- Array with parts from specified string.
-
-
-
-
-
-
-
-
-
-
-
xmlEncode
-
string xmlEncode(<string> s)
-
-
XML Encodes the specified string based on configured entity encoding. The entity encoding modes
- are raw, numeric and named. Where raw is the fastest and named is default.
-
-
-
-
-
- Parameters:
-
-
s - String to convert to XML.
-
-
-
-
-
-
-
-
- Returns:
-
- Encoded XML string based on configured entity encoding.
-
Adds a keyboard shortcut to a specific command. These shortcuts can for example be added
- at the initInstance callback of a plugin. The shortcut description can be a language variable name
- or a string describing the function. If you don't specify a command, the shortcut will simply be a blocker
- shortcut. This enables you to remove built in shortcuts or remove theme specific shortcuts from a plugin.
- Example shortcut inst.addShortcut('ctrl,alt', 'k', 'mceSomeCommand', false, 'somevalue');
- Example blocker inst.addShortcut('ctrl,alt', 'k');
-
-
-
-
-
- Parameters:
-
-
m - List of shortcut modifiers keys, for example "ctrl,alt".
-
-
-
k - Shortcut key char for example "s" or a keycode value "13".
-
-
-
d - Optional Shortcut description, this will be presented in the about dialog.
-
-
-
cmd - Optional Command name to execute, for example mceLink or Bold.
-
-
-
ui - Optional True/false state if a UI (dialog) should be presented or not.
-
-
-
va - Optional command value, this can be anything.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if the shortcut was added or not
-
-
-
-
-
-
-
-
-
-
-
autoResetDesignMode
-
void autoResetDesignMode()
-
-
Auto resets the design mode of the document if it gets lost.
- This is a Gecko specific function since it's a workaround for a bug where Gecko browsers
- loose the designMode state if the editor is hidden and shown in a tab or div.
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.
-
-
-
-
-
- Parameters:
-
-
command - Command name to execute, for example mceLink or Bold.
-
-
-
user_interface - True/false state if a UI (dialog) should be presented or not.
-
-
-
value - Optional command value, this can be anything.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
getBody
-
HTMLElement getBody()
-
-
Returns the body element of a editor instance.
-
-
-
-
-
-
-
-
- Returns:
-
- Body element of a editor instance.
-
-
-
-
-
-
-
-
-
-
-
getDoc
-
DOMDocument getDoc()
-
-
Returns the DOM document of a editor instance.
-
-
-
-
-
-
-
-
- Returns:
-
- DOM document of a editor instance.
-
-
-
-
-
-
-
-
-
-
-
getFocusElement
-
HTMLElement getFocusElement()
-
-
Returns the currently selected element. This is was added for compatiblity and is deprecated.
- Please use inst.selection.getFocusElement instead.
-
-
-
-
-
-
-
-
- Returns:
-
- Currently selected element.
-
-
-
-
-
-
-
- Deprecated
-
-
-
-
-
-
-
getRng
-
DOMRange getRng()
-
-
Returns the browsers selections first range instance. This is was added for compatiblity and is deprecated.
- Please use inst.selection.getRng instead.
-
-
-
-
-
-
-
-
- Returns:
-
- Browsers selections first range instance.
-
-
-
-
-
-
-
- Deprecated
-
-
-
-
-
-
-
getSel
-
DOMSelection getSel()
-
-
Returns the browsers selection instance. This is was added for compatiblity and is deprecated.
- Please use inst.selection.getSel instead.
-
-
-
-
-
-
-
-
- Returns:
-
- Browser selection instance.
-
-
-
-
-
-
-
- Deprecated
-
-
-
-
-
-
-
getWin
-
Window getWin()
-
-
Returns the window of a editor instance.
-
-
-
-
-
-
-
-
- Returns:
-
- Window of a editor instance.
-
-
-
-
-
-
-
-
-
-
-
handleShortcut
-
boolean handleShortcut(<DOMEvent> e)
-
-
Executes shortcuts based on the event information.
-
-
-
-
-
- Parameters:
-
-
e - Keyboard event to handle.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if the shortcut was found and executed or not.
-
-
-
-
-
-
-
-
-
-
-
hasPlugin
-
boolean hasPlugin(<string> n)
-
-
Returns true/false if the instance has the current plugin available.
-
-
-
-
-
- Parameters:
-
-
n - Plugin name to check for.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if the instance has the current plugin available.
-
-
-
-
-
-
-
-
-
-
-
isDirty
-
boolean isDirty()
-
-
Returns true/false if the editor instance is dirty or not. In other words if it has been modified
- or not.
-
-
-
-
-
-
-
-
- Returns:
-
- Editor instance dirty state.
-
-
-
-
-
-
-
-
-
-
-
isHidden
-
boolean isHidden()
-
-
Returns if the instance is hidden or not. This is a Gecko specific function
- other browsers will always return false. This function is used to workaround the lost
- designMode bug in Gecko browsers.
-
-
-
-
-
-
-
-
- Returns:
-
- Returns if the instance is hidden or not.
-
-
-
-
-
-
-
-
-
-
-
queryCommandState
-
boolean queryCommandState(<string> c)
-
-
Returns a command specific state, for example if bold is enabled or not.
-
-
-
-
-
- Parameters:
-
-
c - Command to query state from.
-
-
-
-
-
-
-
-
- Returns:
-
- Command specific state, for example if bold is enabled or not.
-
-
-
-
-
-
-
-
-
-
-
queryCommandValue
-
mixed queryCommandValue(<string> c)
-
-
Returns a command specific value, for example the current font size.
-
-
-
-
-
- Parameters:
-
-
c - Command to query value from.
-
-
-
-
-
-
-
-
- Returns:
-
- Command specific value, for example the current font size.
-
-
-
-
-
-
-
-
-
-
-
repaint
-
void repaint()
-
-
Repaints the editarea in Gecko browsers. This method removes ghost resize handlers
- and other trailing graphics.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
setBaseHREF
-
void setBaseHREF(<string> u)
-
-
Sets the base href url of the current document instance. This method is used
- to temporarly remove the base url during copy/paste and drag/drop operations
- of relative links from external sites into TinyMCE. MSIE has a bug and converts
- relative links from external sites to absolute links incorrectly.
-
-
-
-
-
- Parameters:
-
-
u - URL to set as base URL or null to remove it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
switchSettings
-
void switchSettings()
-
-
Switches the global TinyMCE settings to the current instance settings. This method is
- used to handle multiple configurations.
-
-
- TinyMCE_Engine
-
- ()
-
-
-
- Core engine class for TinyMCE, a instance of this class is available as a global called tinyMCE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-
- HTMLElement
-
-
-
-
-
- _getElementById(<string> id)
-
-
-
- Returns a element by id, this will also search the form names to match the id.
-
-
-
-
-
-
- Object
-
-
-
-
-
- accessibleEventHandler(<DOMEvent> e)
-
-
-
- Accessibility handler that gets executed when the user hits a key in a select element.
-
-
-
-
-
-
- void
-
-
-
-
-
- addButtonMap(<string> m)
-
-
-
- Adds a list of buttons available in the tiled button image used by the button_tile_map option.
-
-
-
-
-
-
- void
-
-
-
-
-
- addEvent(<HTMLElement> o, <string> n, <function> h)
-
-
-
- Adds a event handler function to the specified object.
-
-
-
-
-
-
- void
-
-
-
-
-
- addEventHandlers(<string> editor_id)
-
-
-
- Adds the handleEvent function to the specified editor instance.
-
-
-
-
-
-
- void
-
-
-
-
-
- addMCEControl(<HTMLElement> replace_element, <string> form_element_name, <DOMDocument> target_document)
-
-
-
- Adds a TinyMCE editor control instance to a specific form element.
-
-
-
-
-
-
- void
-
-
-
-
-
- addPlugin(n, <TinyMCE_Plugin> p)
-
-
-
- Adds the specified plugin to the list of loaded plugins, this will also setup the baseURL
- property of the plugin.
-
-
-
-
-
-
- Object
-
-
-
-
-
- addSelectAccessibility(<DOMEvent> e, <HTMLElement> s, <DOMWindow> w)
-
-
-
- Adds accessibility keydown handler to the specified select element.
-
-
-
-
-
-
- void
-
-
-
-
-
- addTheme(&l<TinyMCE_Theme> t;string> n, t)
-
-
-
- Adds the specified theme in to the list of loaded themes.
-
-
-
-
-
-
- void
-
-
-
-
-
- addToLang(<string> prefix, <Array> ar)
-
-
-
- Adds language items to the global language array.
-
-
-
-
-
-
- string
-
-
-
-
-
- applyTemplate(<string> h, <Array> as)
-
-
-
- Replaces language, args and settings variables in a HTML string.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- callFunc(<<<Array> a href="TinyMCE_Control.html">TinyMCE_Control> ins, <string> p, <string> n, <int> m, a)
-
-
-
- Executes callback chain.
-
-
-
-
-
-
- void
-
-
-
-
-
- cancelEvent(<DOMEvent> e)
-
-
-
- Cancels the specified event, this will disable the event from be passed to other listeners in event chain.
-
-
-
-
-
-
- void
-
-
-
-
-
- cleanupAnchors(<DOMDocument> doc)
-
-
-
- Moves the contents of a anchor outside and after the anchor.
-
-
-
-
-
-
- string
-
-
-
-
-
- cleanupEventStr(<string> s)
-
-
-
- Removes MSIE 5.5 specific event wrapper function form a event string.
-
-
-
-
-
-
- string
-
-
-
-
-
- cleanupHTMLCode(<string> s)
-
-
-
- Makes some preprocessing cleanup routines on the specified HTML string.
-
-
-
-
-
-
- Array
-
-
-
-
-
- clearArray(a)
-
-
-
- Returns a cleared array, since some external libraries tend to extend the Array core object
- arrays needs to be cleaned from these extended functions.
-
-
-
- confirmAdd(<DOMEvent> e, <Array> settings)
-
-
-
- Displays a confirm dialog when a user clicks/focus a textarea that is to be converted into
- a TinyMCE instance.
-
-
-
-
-
-
- string
-
-
-
-
-
- convertAbsoluteURLToRelativeURL(<string> base_url, <string> url_to_relative)
-
-
-
- Converts an absolute path to relative path.
-
-
-
-
-
-
- void
-
-
-
-
-
- convertAllRelativeURLs(<HTMLElement> body)
-
-
-
- Converts all img and a element URLs to absolute URLs.
-
-
-
-
-
-
- void
-
-
-
-
-
- convertFontsToSpans(<DOMDocument> doc)
-
-
-
- Convers fonts to spans in the specified document.
-
-
-
-
-
-
- string
-
-
-
-
-
- convertHexToRGB(<string> s)
-
-
-
- Returns a rgb(n,n,n) string from a hexadecimal value.
-
-
-
-
-
-
- string
-
-
-
-
-
- convertRelativeToAbsoluteURL(<string> base_url, <string> relative_url)
-
-
-
- Converts an relative path to absolute path.
-
-
-
-
-
-
- string
-
-
-
-
-
- convertRGBToHex(<string> s, <boolean> k)
-
-
-
- Returns a hexadecimal version of the specified rgb(1,2,3) string.
-
-
-
-
-
-
- void
-
-
-
-
-
- convertSpansToFonts(<DOMDocument> doc)
-
-
-
- Converts span elements to font elements in the specified document instance.
-
-
-
-
-
-
- string
-
-
-
-
-
- convertURL(<string> url, <HTMLElement> node, <boolean> on_save)
-
-
-
- Converts the specified URL based in TinyMCE configuration settings.
-
-
-
-
-
-
- void
-
-
-
-
-
- debug()
-
-
-
- Debugs the specified message to a screen.
-
-
-
-
-
-
- Object
-
-
-
-
-
- dispatchCallback(<TinyMCE_Control> i, <string> p, <string> n)
-
-
-
- Dispatches the specified callback on all options, plugins and themes.
-
-
-
-
-
-
- string
-
-
-
-
-
- entityDecode(<string> s)
-
-
-
- HTML entity decode a string, replaces < with <.
-
-
-
-
-
-
- object
-
-
-
-
-
- evalFunc(<string> f, <int> idx, <Array> a)
-
-
-
- Evaluates the specified function and uses the array of arguments.
-
-
-
-
-
-
- void
-
-
-
-
-
- execCommand(<string> command, <boolean> user_interface, <object> value)
-
-
-
- Executes a command on the selected or last selected TinyMCE editor control instance.
-
-
-
-
-
-
- Object
-
-
-
-
-
- execCommandCallback(<TinyMCE_Control> i, <string> p, <string> n)
-
-
-
- Executes the specified execcommand callback on all options, plugins and themes.
-
-
-
-
-
-
- void
-
-
-
-
-
- execInstanceCommand(<string> editor_id, <string> command, <boolean> user_interface, <object> value, <boolean> focus)
-
-
-
- Executes a command on a specific editor instance by id.
-
-
-
-
-
-
- Object
-
-
-
-
-
- executeCallback(<TinyMCE_Control> i, <string> p, <string> n)
-
-
-
- Executes the specified callback on all options, plugins and themes.
-
-
-
-
-
-
- string
-
-
-
-
-
- fixGeckoBaseHREFBug(<boolean> m, <HTMLElement> e, <string> h)
-
-
-
- Fixes a Gecko specific bug where href, src attribute values gets converted incorrectly
- when inserted into editor.
-
-
-
-
-
-
- TinyMCE_ElementPosition
-
-
-
-
-
- getAbsPosition(<HTMLNode> n)
-
-
-
- Returns the absolute x, y position of a node.
-
-
-
-
-
-
- string
-
-
-
-
-
- getAttrib(<HTMLElement> elm, <string> name, <string> default_value)
-
-
-
- Returns the attribute value of a element or the default value if it wasn't found.
-
-
-
-
-
-
- string
-
-
-
-
-
- getButtonHTML(<string> id, <string> lang, <string> img, <string> cmd, <string> ui, <string> val)
-
-
-
- Returns the HTML code for a normal button control.
-
-
-
-
-
-
- string
-
-
-
-
-
- getContent(<string> editor_id)
-
-
-
- Returns the HTML contents of the specified editor instance id.
-
-
-
-
-
-
- string
-
-
-
-
-
- getControlHTML(<string> c)
-
-
-
- Returns the HTML for the specified control this will loop through
- the theme and all plugins inorder to find the control.
-
-
-
-
-
-
- Array
-
-
-
-
-
- getCSSClasses(<string> editor_id, <DOMDocument> doc)
-
-
-
- Returns a array of CSS classes that is available in a document.
-
-
-
-
-
-
- string
-
-
-
-
-
- getEditorId(<string> form_element)
-
-
-
- Returns the editor instance id of a specific form element.
-
-
-
-
-
-
- HTMLElement
-
-
-
-
-
- getElementByAttributeValue(<HTMLElement> n, <string> e, <string> a, <string> v)
-
-
-
- Returns a element by a specific attribute and it's value.
-
-
-
-
-
-
- Array
-
-
-
-
-
- getElementsByAttributeValue(<HTMLElement> n, <string> e, <string> a, <string> v)
-
-
-
- Returns a element array by a specific attribute and it's value.
-
-
-
- getInstanceById(<string> editor_id)
-
-
-
- Returns a TinyMCE editor instance by the specified editor id or null if it wasn't found.
-
-
-
-
-
-
- object
-
-
-
-
-
- getLang(<string> name, <string> default_value, <boolean> parse_entities)
-
-
-
- Returns a language variable value from the language packs.
-
-
-
-
-
-
- Array
-
-
-
-
-
- getNodeTree(&l<int> t;HTMLNode> n, <Array> na, t, <string> nn)
-
-
-
- Returns a array of nodes selected retrived from the child nodes of the specified node.
-
-
-
-
-
-
- string
-
-
-
-
-
- getOuterHTML(<HTMLElement> e)
-
-
-
- Returns the outer HTML of a element, this uses the outerHTML
- property in MSIE and Opera and a workaround for Gecko.
-
-
-
-
-
-
- object
-
-
-
-
-
- getParam(<string> name, <string> default_value, <boolean> strip_whitespace, <string> split_chr)
-
-
-
- Returns a specific configuration setting or the default value if it wasn't found.
-
-
-
-
-
-
- HTMLElement
-
-
-
-
-
- getParentBlockElement(<HTMLNode> n)
-
-
-
- Returns the first block element parent of the specified node.
-
-
-
-
-
-
- HTMLElement
-
-
-
-
-
- getParentElement(<HTMLNode> node, <string> names, <string> attrib_name, <string> attrib_value)
-
-
-
- Returns the parent element of the specified node based on the search criteria.
-
-
-
-
-
-
- string
-
-
-
-
-
- getVisualAidClass(<string> class_name, <boolean> state)
-
-
-
- Returns the visual aid class string, this will add/remove the visual aid class.
-
-
-
-
-
-
- Object
-
-
-
-
-
- getWindowArg(<string> n, d)
-
-
-
- Returns the window argument to be passed to TinyMCE popup.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- handleEvent(<DOMEvent> e)
-
-
-
- Event handler function that gets executed each time a event occurs in a TinyMCE editor control instance.
-
-
-
-
-
-
- void
-
-
-
-
-
- handleVisualAid(<HTMLElement> el, <boolean> deep, <boolean> state, <TinyMCE_Control> inst)
-
-
-
- Adds visual aid classes to all elements that need them recursive in the DOM tree.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- hasPlugin(<string> n)
-
-
-
- Returns true/false if the specified plugin is loaded or not.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- hasTheme(<string> n)
-
-
-
- Returns true/false if the specified theme is loaded or not.
-
-
-
-
-
-
- void
-
-
-
-
-
- importCSS(<DOMDocument> doc, <string> css_file)
-
-
-
- Imports a CSS file into a allready loaded document.
-
-
-
-
-
-
- void
-
-
-
-
-
- importPluginLanguagePack(<string> name, <string> valid_languages)
-
-
-
- Loads a plugin specific language pack.
-
-
-
-
-
-
- void
-
-
-
-
-
- importThemeLanguagePack(<string> name)
-
-
-
- Loads a theme specific language pack.
-
-
-
-
-
-
- void
-
-
-
-
-
- init(settings)
-
-
-
- Initializes TinyMCE with the specific configuration settings.
-
-
-
-
-
-
- void
-
-
-
-
-
- insertAfter(<HTMLNode> n, <HTMLNode> r)
-
-
-
- Inserts a node after the specific node.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- isBlockElement(<HTMLNode> n)
-
-
-
- Returns true/false if the specified node is a block element or not.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- isInstance(<object> o)
-
-
-
- Returns true/false if a specific object is a TinyMCE_Control instance or not.
-
-
-
-
-
-
- void
-
-
-
-
-
- loadCSS(<string> url)
-
-
-
- Loads the specified CSS by writing the a link tag to the current page.
-
-
-
-
-
-
- void
-
-
-
-
-
- loadScript(<string> url)
-
-
-
- Loads the specified script by writing the a script tag to the current page.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- onLoad()
-
-
-
- Gets executed when the page loads or get intitialized.
-
-
-
-
-
-
- void
-
-
-
-
-
- onMouseMove()
-
-
-
- Mouse move handler function, this will be executed each time
- the mouse is moved within a editor instance.
-
-
-
-
-
-
- void
-
-
-
-
-
- openWindow(<Array> template, <Array> args)
-
-
-
- Opens a popup window based in the specified input data.
-
-
-
-
-
-
- Array
-
-
-
-
-
- parseStyle(<string> str)
-
-
-
- Parses the specified HTML style data.
-
-
-
-
-
-
- TinyMCE_URL_Item
-
-
-
-
-
- parseURL(<string> url_str)
-
-
-
- Parses a URL in to its diffrent components.
-
-
-
-
-
-
- boolean
-
-
-
-
-
- queryInstanceCommandState(<string> editor_id, <string> command)
-
-
-
- Queries a command state for a specific command on a specific editor instance.
-
-
-
-
-
-
- object
-
-
-
-
-
- queryInstanceCommandValue(<string> editor_id, <string> command)
-
-
-
- Queries a command value for a specific command on a specific editor instance.
-
-
-
-
-
-
- string
-
-
-
-
-
- regexpReplace(<string> in_str, <string> reg_exp, <string> replace_str, opts)
-
-
-
- Regexp replaces the contents of a string.
-
-
-
-
-
-
- void
-
-
-
-
-
- removeMCEControl(<string> editor_id)
-
-
-
- Removes a TinyMCE editor control instance by id.
-
-
-
-
-
-
- void
-
-
-
-
-
- removeTinyMCEFormElements(<HTMLElement> form_obj)
-
-
-
- Removes/disables TinyMCE built in form elements such as select boxes for font sizes etc.
-
-
-
-
-
-
- string
-
-
-
-
-
- replaceVar(<string> h, <string> r, <string> v)
-
-
-
- Replaces a specific variable in the string with a nother string.
-
-
-
-
-
-
- void
-
-
-
-
-
- resetForm(<int> form_index)
-
-
-
- Resets a forms TinyMCE instances based on form index.
-
-
-
-
-
-
- string
-
-
-
-
-
- serializeStyle(<Array> ar)
-
-
-
- Serializes the specified style item name/value array into a HTML string.
-
-
-
-
-
-
- string
-
-
-
-
-
- serializeURL(<TinyMCE_URL_Item> up)
-
-
-
- Serializes the specified URL object into a string.
-
-
-
-
-
-
- void
-
-
-
-
-
- setAttrib(<HTMLElement> element, <string> name, <string> value, <boolean> fix_value)
-
-
-
- Sets the attribute value for a specific attribute.
-
-
-
-
-
-
- void
-
-
-
-
-
- setContent(<string> h)
-
-
-
- Sets the HTML contents of the selected editor instance.
-
-
-
-
-
-
- void
-
-
-
-
-
- setInnerHTML(<HTMLElement> e, <string> h)
-
-
-
- Sets the innerHTML property of a element, this function also
- fixes a MSIE bug where the first comment is removed.
-
-
-
-
-
-
- void
-
-
-
-
-
- setOuterHTML(<HTMLElement> e, <string> h)
-
-
-
- Sets the outer HTML of a element, this uses the outerHTML
- property in MSIE and Opera and a workaround for Gecko.
-
-
-
-
-
-
- void
-
-
-
-
-
- setPluginBaseURL(<string> n, <string> u)
-
-
-
- Sets the baseURL of the specified plugin, this is useful if the plugin is loaded from
- a external location.
-
-
-
- setupContent(<string> editor_id)
-
-
-
- Setups the contents of TinyMCE editor instance and fills it with contents.
-
-
-
-
-
-
- void
-
-
-
-
-
- setWindowArg(<string> n, <string> v)
-
-
-
- Sets the window argument to be passed to TinyMCE popup.
-
-
-
-
-
-
- string
-
-
-
-
-
- storeAwayURLs(<string> s)
-
-
-
- Stores away the src and href attribute values in separate mce_src and mce_href attributes.
-
-
-
-
-
-
- void
-
-
-
-
-
- submitPatch()
-
-
-
- Piggyback onsubmit event handler function, this will remove/hide the TinyMCE specific form elements
- call triggerSave to fill the textarea with the correct contents then call the old piggy backed event handler.
-
-
-
-
-
-
- void
-
-
-
-
-
- switchClass(<HTMLElement> ei, <string> c)
-
-
-
- Switches the CSS class of the specified element.
-
-
-
-
-
-
- void
-
-
-
-
-
- triggerNodeChange(<boolean> focus, <boolean> setup_content)
-
-
-
- Triggers a nodeChange event to every theme and plugin.
-
-
-
-
-
-
- void
-
-
-
-
-
- triggerSave(<boolean> skip_cleanup, <boolean> skip_callback)
-
-
-
- Moves the contents from a TinyMCE editor control instance to the hidden textarea
- that got replaced with TinyMCE.
-
-
-
-
-
-
- string
-
-
-
-
-
- trim(<string> s)
-
-
-
- Removes all prefix, suffix whitespace of a string.
-
-
-
- updateContent(<string> form_element_name)
-
-
-
- Moves the contents from the hidden textarea to the editor that gets inserted.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Field Detail
-
-
-
-
-
-
buttonMap
-
Object buttonMap
-
-
-
-
-
-
-
-
configs
-
Object configs
-
-
-
-
-
-
-
-
currentConfig
-
Object currentConfig
-
-
-
-
-
-
-
-
dialogCounter
-
Object dialogCounter
-
-
-
-
-
-
-
-
eventHandlers
-
Object eventHandlers
-
-
-
-
-
-
-
-
idCounter
-
Object idCounter
-
-
-
-
-
-
-
-
instances
-
Object instances
-
-
-
-
-
-
-
-
isGecko
-
Object isGecko
-
-
-
-
-
-
-
-
isLoaded
-
Object isLoaded
-
-
-
-
-
-
-
-
isMac
-
Object isMac
-
-
-
-
-
-
-
-
isMSIE
-
Object isMSIE
-
-
-
-
-
-
-
-
isMSIE5
-
Object isMSIE5
-
-
-
-
-
-
-
-
isMSIE5_0
-
Object isMSIE5_0
-
-
-
-
-
-
-
-
isNS7
-
Object isNS7
-
-
-
-
-
-
-
-
isNS71
-
Object isNS71
-
-
-
-
-
-
-
-
isOpera
-
Object isOpera
-
-
-
-
-
-
-
-
isSafari
-
Object isSafari
-
-
-
-
-
-
-
-
loadedFiles
-
Object loadedFiles
-
-
-
-
-
-
-
-
loadedPlugins
-
Object loadedPlugins
-
-
-
-
-
-
-
-
majorVersion
-
Object majorVersion
-
-
-
-
-
-
-
-
minorVersion
-
Object minorVersion
-
-
-
-
-
-
-
-
plugins
-
Object plugins
-
-
-
-
-
-
-
-
releaseDate
-
Object releaseDate
-
-
-
-
-
-
-
-
switchClassCache
-
Object switchClassCache
-
-
-
-
-
-
-
-
themes
-
Object themes
-
-
-
-
-
-
-
-
windowArgs
-
Object windowArgs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Constructor Detail
-
-
-
-
-
-TinyMCE_Engine
-
TinyMCE_Engine()
-
-
-
- Core engine class for TinyMCE, a instance of this class is available as a global called tinyMCE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Method Detail
-
-
-
-
-
-
-
-
_getElementById
-
HTMLElement _getElementById(<string> id)
-
-
Returns a element by id, this will also search the form names to match the id.
-
-
-
-
-
- Parameters:
-
-
id - Id of element.
-
-
-
-
-
-
-
-
- Returns:
-
- HTML element that matches the id.
-
-
-
-
-
-
-
-
-
-
-
accessibleEventHandler
-
Object accessibleEventHandler(<DOMEvent> e)
-
-
Accessibility handler that gets executed when the user hits a key in a select element.
- This handler trams the enter/return or space key and then executes the onchange event handler.
-
-
-
-
-
- Parameters:
-
-
e - DOM event object instance.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
addButtonMap
-
void addButtonMap(<string> m)
-
-
Adds a list of buttons available in the tiled button image used by the button_tile_map option.
-
-
-
-
-
- Parameters:
-
-
m - Comma separated list of buttons that are available in tiled image.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
addEvent
-
void addEvent(<HTMLElement> o, <string> n, <function> h)
-
-
Adds a event handler function to the specified object.
-
-
-
-
-
- Parameters:
-
-
o - Object to add event handler to.
-
-
-
n - Event name to listen to for example "click".
-
-
-
h - Function handler to execute when event occurs.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
addEventHandlers
-
void addEventHandlers(<string> editor_id)
-
-
Adds the handleEvent function to the specified editor instance.
-
-
-
-
-
- Parameters:
-
-
editor_id - Editor control instance to add event handler to.
-
ins - TinyMCE editor control instance to execute callback on.
-
-
-
p - TinyMCE callback parameter name.
-
-
-
n - Function name to execute.
-
-
-
m - Execution mode value, 0 = no chain, 1 = event chain, 2 = execcommand chain.
-
-
-
a - Array with function arguments.
-
-
-
-
-
-
-
-
- Returns:
-
- true - if the callback was executed, false if it wasn't.
-
-
-
-
-
-
-
-
-
-
-
cancelEvent
-
void cancelEvent(<DOMEvent> e)
-
-
Cancels the specified event, this will disable the event from be passed to other listeners in event chain.
-
-
-
-
-
- Parameters:
-
-
e - Event to cancel.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
cleanupAnchors
-
void cleanupAnchors(<DOMDocument> doc)
-
-
Moves the contents of a anchor outside and after the anchor. Only if the anchor doesn't
- have a href.
-
-
-
-
-
- Parameters:
-
-
doc - DOM document instance to fix anchors in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
cleanupEventStr
-
string cleanupEventStr(<string> s)
-
-
Removes MSIE 5.5 specific event wrapper function form a event string.
- This will also remove the event blocker if it's added in front of the event.
-
-
-
-
-
- Parameters:
-
-
s - String to replace event data in.
-
-
-
-
-
-
-
-
- Returns:
-
- Replaced string value.
-
-
-
-
-
-
-
-
-
-
-
cleanupHTMLCode
-
string cleanupHTMLCode(<string> s)
-
-
Makes some preprocessing cleanup routines on the specified HTML string.
- This includes forcing some tags to be open so MSIE doesn't fail. Forcing other to close and
- padding paragraphs with non breaking spaces. This function is used when the editor gets
- initialized with content.
-
-
-
-
-
- Parameters:
-
-
s - HTML string to cleanup.
-
-
-
-
-
-
-
-
- Returns:
-
- Cleaned HTML string.
-
-
-
-
-
-
-
-
-
-
-
clearArray
-
Array clearArray(a)
-
-
Returns a cleared array, since some external libraries tend to extend the Array core object
- arrays needs to be cleaned from these extended functions. So this function simply sets any
- named properties back to null.
-
-
-
-
-
- Parameters:
-
-
Name - /Value array to clear.
-
-
-
-
-
-
-
-
- Returns:
-
- Cleared name/value array.
-
-
-
-
-
-
-
-
-
-
-
closeWindow
-
void closeWindow(<DOMWindow> win)
-
-
Closes the specified window. This function is deprecated and should be replaced with
- tinyMCEPopup.close();.
Compresses larger styles into a smaller. Since MSIE automaticly converts
- border: 1px solid red to border-left: 1px solid red, border-righ: 1px solid red and so forth.'
- This will bundle them together again if the information is the same in each item.
-
-
-
-
-
- Parameters:
-
-
ar - Style name/value array with items.
-
-
-
pr - Style item prefix to bundle for example border.
-
-
-
sf - Style item suffix to bunlde for example -width or -width.
-
-
-
res - Result name, for example border-width.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
confirmAdd
-
void confirmAdd(<DOMEvent> e, <Array> settings)
-
-
Displays a confirm dialog when a user clicks/focus a textarea that is to be converted into
- a TinyMCE instance.
-
-
-
-
-
- Parameters:
-
-
e - DOM event instance.
-
-
-
settings - Name/Value array of initialization settings.
-
base_url - URL to make as a base path, URLs will be converted relative from this point.
-
-
-
url_to_relative - URL to convert into a relative URL.
-
-
-
-
-
-
-
-
- Returns:
-
- Relative URL based in input.
-
-
-
-
-
-
-
-
-
-
-
convertAllRelativeURLs
-
void convertAllRelativeURLs(<HTMLElement> body)
-
-
Converts all img and a element URLs to absolute URLs. This will use the mce_src or mce_href attribute values
- if they are provided. This function is used when the editor is initialized.
-
-
-
-
-
- Parameters:
-
-
body - HTML element to convert all URLs in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
convertFontsToSpans
-
void convertFontsToSpans(<DOMDocument> doc)
-
-
Convers fonts to spans in the specified document.
- Todo: Move this function into a XHTML plugin or simmilar.
-
-
-
-
-
- Parameters:
-
-
doc - Document instance to convert fonts in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
convertHexToRGB
-
string convertHexToRGB(<string> s)
-
-
Returns a rgb(n,n,n) string from a hexadecimal value.
Converts the specified URL based in TinyMCE configuration settings.
-
-
-
-
-
- Parameters:
-
-
url - URL to convert based on config.
-
-
-
node - HTML element that holds the URL.
-
-
-
on_save - Is this convertion the final output URL.
-
-
-
-
-
-
-
-
- Returns:
-
- Converted URL string.
-
-
-
-
-
-
-
-
-
-
-
debug
-
void debug()
-
-
Debugs the specified message to a screen.
-
-
-
-
-
- Parameters:
-
-
Numerous - arguments that will be outputed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
dispatchCallback
-
Object dispatchCallback(<TinyMCE_Control> i, <string> p, <string> n)
-
-
Dispatches the specified callback on all options, plugins and themes. This will not
- chain them, so all functions callbacks will be executed regardless if the return true/false.
-
-
-
-
-
- Parameters:
-
-
i - TinyMCE editor control instance to execute callback on.
-
-
-
p - TinyMCE callback parameter to execute.
-
-
-
n - Function name to execute.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if they where dispatched.
-
-
-
-
-
-
-
-
-
-
-
entityDecode
-
string entityDecode(<string> s)
-
-
HTML entity decode a string, replaces < with <.
-
-
-
-
-
- Parameters:
-
-
s - Entity string to decode into normal string.
-
-
-
-
-
-
-
-
- Returns:
-
- Entity decoded string.
-
-
-
-
-
-
-
-
-
-
-
evalFunc
-
object evalFunc(<string> f, <int> idx, <Array> a)
-
-
Evaluates the specified function and uses the array of arguments.
-
-
-
-
-
- Parameters:
-
-
f - Function reference to execute.
-
-
-
idx - Index in array to start grabbing arguments from.
-
Executes a command on the selected or last selected TinyMCE editor control instance. This function also handles
- some non instance specific commands like mceAddControl, mceRemoveControl, mceHelp or mceFocus.
-
-
-
-
-
- Parameters:
-
-
command - Command name to execute, for example mceLink or Bold.
-
-
-
user_interface - True/false state if a UI (dialog) should be presented or not.
-
-
-
value - Optional command value, this can be anything.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
execCommandCallback
-
Object execCommandCallback(<TinyMCE_Control> i, <string> p, <string> n)
-
-
Executes the specified execcommand callback on all options, plugins and themes. This will
- chain them, so callback chain will be broken if one function returns true.
-
-
-
-
-
- Parameters:
-
-
i - TinyMCE editor control instance to execute callback on.
-
Executes a command on a specific editor instance by id.
-
-
-
-
-
- Parameters:
-
-
editor_id - TinyMCE editor control instance id to perform comman on.
-
-
-
command - Command name to execute, for example mceLink or Bold.
-
-
-
user_interface - True/false state if a UI (dialog) should be presented or not.
-
-
-
value - Optional command value, this can be anything.
-
-
-
focus - True/false if the editor instance should be focused first.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
executeCallback
-
Object executeCallback(<TinyMCE_Control> i, <string> p, <string> n)
-
-
Executes the specified callback on all options, plugins and themes. This will
- chain them, so callback chain will be broken if one function returns false.
-
-
-
-
-
- Parameters:
-
-
i - TinyMCE editor control instance to execute callback on.
-
-
-
p - TinyMCE callback parameter to execute.
-
-
-
n - Function name to execute.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if a callback was executed.
-
-
-
-
-
-
-
-
-
-
-
fixGeckoBaseHREFBug
-
string fixGeckoBaseHREFBug(<boolean> m, <HTMLElement> e, <string> h)
-
-
Fixes a Gecko specific bug where href, src attribute values gets converted incorrectly
- when inserted into editor. This function will replace all src, href with xsrc and xhref
- to keep the values from chaging when they get inserted.
-
-
-
-
-
- Parameters:
-
-
m - Mode state, true is to replace the src, href attributes to xsrc and xhref.
-
-
-
e - HTML element to replace them in. (Will be used if m is 0)
-
-
-
h - HTML code to replace them in. (Will be used if m is 1)
-
-
-
-
-
-
-
-
- Returns:
-
- Converted string or the specified HTML value depending on mode.
-
Returns the HTML code for a normal button control.
-
-
-
-
-
- Parameters:
-
-
id - Button control id, this will be the suffix for the element id, the prefix is the editor id.
-
-
-
lang - Language variable key name to insert as the title/alt of the button image.
-
-
-
img - Image URL to insert, {$themeurl} and {$pluginurl} will be replaced.
-
-
-
cmd - Command to execute when the user clicks the button.
-
-
-
ui - Optional user interface boolean for command.
-
-
-
val - Optional value for command.
-
-
-
-
-
-
-
-
- Returns:
-
- HTML code for a normal button based in input information.
-
-
-
-
-
-
-
-
-
-
-
getContent
-
string getContent(<string> editor_id)
-
-
Returns the HTML contents of the specified editor instance id.
-
-
-
-
-
- Parameters:
-
-
editor_id - Editor instance id to retrive HTML code from.
-
-
-
-
-
-
-
-
- Returns:
-
- HTML contents of editor id or null if it wasn't found.
-
-
-
-
-
-
-
-
-
-
-
getControlHTML
-
string getControlHTML(<string> c)
-
-
Returns the HTML for the specified control this will loop through
- the theme and all plugins inorder to find the control. The callback for each
- theme and plugin is called getControlHTML.
-
-
-
-
-
- Parameters:
-
-
c - Control name/id to get HTML code for.
-
-
-
-
-
-
-
-
- Returns:
-
- HTML code for the specified control or empty string if it wasn't found.
-
Returns the visual aid class string, this will add/remove the visual aid class.
-
-
-
-
-
- Parameters:
-
-
class_name - Class name value to add/remove visual aid classes from.
-
-
-
state - true/false if the classes should be added or removed.
-
-
-
-
-
-
-
-
- Returns:
-
- New class value containing the visual aid classes or not.
-
-
-
-
-
-
-
-
-
-
-
getWindowArg
-
Object getWindowArg(<string> n, d)
-
-
Returns the window argument to be passed to TinyMCE popup.
- TinyMCE_Engine.prototype.Use = tinyMCEPopup;.getWindowArg instead.
-
-
-
-
-
- Parameters:
-
-
n - Window argument name.
-
-
-
-
-
-
-
-
- Returns:
-
- Argument value or default value if it wasn't found.
-
-
-
-
-
-
-
- Deprecated
-
-
-
-
-
-
-
handleEvent
-
boolean handleEvent(<DOMEvent> e)
-
-
Event handler function that gets executed each time a event occurs in a TinyMCE editor control instance.
- TinyMCE_Engine.prototype.Todo = Fix;the return statements so they return true or false.
-
-
-
-
-
- Parameters:
-
-
e - DOM event object reference.
-
-
-
-
-
-
-
-
- Returns:
-
- true - if the event is to be chained, false - if the event chain is to be canceled.
-
-
-
-
-
-
-
-
-
-
-
handleVisualAid
-
void handleVisualAid(<HTMLElement> el, <boolean> deep, <boolean> state, <TinyMCE_Control> inst)
-
-
Adds visual aid classes to all elements that need them recursive in the DOM tree.
-
-
-
-
-
- Parameters:
-
-
el - HTML element to add visual aid classes to.
-
-
-
deep - Should they be added to all children aswell.
-
-
-
state - Should they be added or removed.
-
-
-
inst - TinyMCE editor control instance to add/remove them to/from.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
hasPlugin
-
boolean hasPlugin(<string> n)
-
-
Returns true/false if the specified plugin is loaded or not.
-
-
-
-
-
- Parameters:
-
-
n - Plugin name to look for.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if the specified plugin is loaded or not.
-
-
-
-
-
-
-
-
-
-
-
hasTheme
-
boolean hasTheme(<string> n)
-
-
Returns true/false if the specified theme is loaded or not.
-
-
-
-
-
- Parameters:
-
-
n - Theme name/id to check for.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if the specified theme is loaded or not.
-
name - Plugin name/id to load language pack for.
-
-
-
valid_languages - Comma separated list of valid languages for the plugin.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
importThemeLanguagePack
-
void importThemeLanguagePack(<string> name)
-
-
Loads a theme specific language pack.
-
-
-
-
-
- Parameters:
-
-
name - Optional name of the theme to load language pack from.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
init
-
void init(settings)
-
-
Initializes TinyMCE with the specific configuration settings. This method
- may be called multiple times when multiple instances with diffrent settings is to be created.
-
-
-
-
-
- Parameters:
-
-
Name - /Value array of initialization settings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
insertAfter
-
void insertAfter(<HTMLNode> n, <HTMLNode> r)
-
-
Inserts a node after the specific node.
-
-
-
-
-
- Parameters:
-
-
n - New node to insert.
-
-
-
r - Reference node to insert after.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
isBlockElement
-
boolean isBlockElement(<HTMLNode> n)
-
-
Returns true/false if the specified node is a block element or not.
-
-
-
-
-
- Parameters:
-
-
n - Node to verify.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if the specified node is a block element or not.
-
-
-
-
-
-
-
-
-
-
-
isInstance
-
boolean isInstance(<object> o)
-
-
Returns true/false if a specific object is a TinyMCE_Control instance or not.
-
-
-
-
-
- Parameters:
-
-
o - Object to check.
-
-
-
-
-
-
-
-
- Returns:
-
- true/false if it's a control or not.
-
-
-
-
-
-
-
-
-
-
-
loadCSS
-
void loadCSS(<string> url)
-
-
Loads the specified CSS by writing the a link tag to the current page.
- This will also check if the file has been loaded before. This function should only be used
- when the page is loading.
-
-
-
-
-
- Parameters:
-
-
url - CSS file URL to load.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
loadScript
-
void loadScript(<string> url)
-
-
Loads the specified script by writing the a script tag to the current page.
- This will also check if the file has been loaded before. This function should only be used
- when the page is loading.
-
-
-
-
-
- Parameters:
-
-
url - Script URL to load.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
onLoad
-
boolean onLoad()
-
-
Gets executed when the page loads or get intitialized. This function will then convert all textareas/divs that
- is to be converted into TinyMCE editor controls.
-
-
-
-
-
-
-
-
- Returns:
-
- true - if the event is to be chained, false - if the event chain is to be canceled.
-
-
-
-
-
-
-
-
-
-
-
onMouseMove
-
void onMouseMove()
-
-
Mouse move handler function, this will be executed each time
- the mouse is moved within a editor instance. This function stores away the current selection in MSIE
- this will then be used when a undo/redo level is added.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openWindow
-
void openWindow(<Array> template, <Array> args)
-
-
Opens a popup window based in the specified input data. This function
- is used for all popup windows in TinyMCE.
-
- These are the current template TinyMCE_Engine.prototype.keys = file; width, height, close_previous.
-
-
-
-
-
- Parameters:
-
-
template - Popup template data such as with, height etc.
-
-
-
args - Popup arguments that is to be passed to the popup such as custom data.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
parseStyle
-
Array parseStyle(<string> str)
-
-
Parses the specified HTML style data. This will parse for example
- "border-left: 1px; background-color: red" into an key/value array.
-
-
-
-
-
- Parameters:
-
-
str - Style data to parse.
-
-
-
-
-
-
-
-
- Returns:
-
- Name/Value array of style items.
-
-
-
-
-
-
-
-
-
-
-
parseURL
-
TinyMCE_URL_Item parseURL(<string> url_str)
-
-
Parses a URL in to its diffrent components.
-
-
-
-
-
- Parameters:
-
-
url_str - URL string to parse into a URL object.
-
Removes/disables TinyMCE built in form elements such as select boxes for font sizes etc.
- These are disabled when the user submits a form so they don't get picked up by the backend script
- that intercepts the contents.
-
-
-
-
-
- Parameters:
-
-
form_obj - Form object to loop through for TinyMCE specific form elements.
-
Replaces a specific variable in the string with a nother string.
-
-
-
-
-
- Parameters:
-
-
h - String to search in for the variable.
-
-
-
r - Variable name to search for.
-
-
-
v - Value to insert where a variable is found.
-
-
-
-
-
-
-
-
- Returns:
-
- String with replaced variable.
-
-
-
-
-
-
-
-
-
-
-
resetForm
-
void resetForm(<int> form_index)
-
-
Resets a forms TinyMCE instances based on form index.
-
-
-
-
-
- Parameters:
-
-
form_index - Form index to reset.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
serializeStyle
-
string serializeStyle(<Array> ar)
-
-
Serializes the specified style item name/value array into a HTML string. This function
- will force HEX colors in Firefox and convert the URL items of a style correctly.
-
-
-
-
-
- Parameters:
-
-
ar - Name/Value array of items to serialize.
-
-
-
-
-
-
-
-
- Returns:
-
- Serialized HTML string containing the items.
-
-
-
-
-
-
-
-
-
-
-
serializeURL
-
string serializeURL(<TinyMCE_URL_Item> up)
-
-
Serializes the specified URL object into a string.
elm - HTML element to set style attribute item on.
-
-
-
name - Style item name to set.
-
-
-
value - Style item value to set.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
setupContent
-
void setupContent(<string> editor_id)
-
-
Setups the contents of TinyMCE editor instance and fills it with contents.
-
-
-
-
-
- Parameters:
-
-
editor_id - TinyMCE editor instance control id to fill.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
setWindowArg
-
void setWindowArg(<string> n, <string> v)
-
-
Sets the window argument to be passed to TinyMCE popup.
-
-
-
-
-
- Parameters:
-
-
n - Window argument name.
-
-
-
v - Window argument value.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
storeAwayURLs
-
string storeAwayURLs(<string> s)
-
-
Stores away the src and href attribute values in separate mce_src and mce_href attributes.
- This is needed since both MSIE and Gecko messes with these attributes. The old
- src and href will be intact, this simply adds them to a separate attribute.
-
-
-
-
-
- Parameters:
-
-
s - HTML string to replace src and href attributes in.
-
-
-
-
-
-
-
-
- Returns:
-
- HTML string with replaced src and href attributes.
-
-
-
-
-
-
-
-
-
-
-
submitPatch
-
void submitPatch()
-
-
Piggyback onsubmit event handler function, this will remove/hide the TinyMCE specific form elements
- call triggerSave to fill the textarea with the correct contents then call the old piggy backed event handler.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
switchClass
-
void switchClass(<HTMLElement> ei, <string> c)
-
-
Switches the CSS class of the specified element. This method also caches the
- elements in a lookup table for performance. This should only be used for TinyMCE main UI controls
- like buttons or select elements.
Triggers a nodeChange event to every theme and plugin. This will be executed when the cursor moves or
- when a command that modifies the editor contents is executed.
-
-
-
-
-
- Parameters:
-
-
focus - Optional state if the last selected editor instance is to be focused or not.
-
-
-
setup_content - Optional state if it's called from setup content function or not.
-
Moves the contents from a TinyMCE editor control instance to the hidden textarea
- that got replaced with TinyMCE. This is executed automaticly on for example form submit.
-
-
-
-
-
- Parameters:
-
-
skip_cleanup - Optional Skip cleanup, simply move the contents as fast as possible.
-
Removes all prefix, suffix whitespace of a string.
-
-
-
-
-
- Parameters:
-
-
s - String to replace whitespace in.
-
-
-
-
-
-
-
-
- Returns:
-
- Replaced string value.
-
-
-
-
-
-
-
-
-
-
-
unloadHandler
-
void unloadHandler()
-
-
Unload document event handler function. This function will be executed when the
- page is unloaded, this will automaticly move the current editor contents to the textarea element this enables
- the editor to restore it's state when the user presses the back button in the browser.
- This will execute the triggerSave function.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
updateContent
-
void updateContent(<string> form_element_name)
-
-
Moves the contents from the hidden textarea to the editor that gets inserted.
-
-
-
-
-
- Parameters:
-
-
form_element_name - Form element name to move contents from.
-
- Constructs a Selection instance and binds it to the specificed TinyMCE editor control.
-
-
-
-
-
- Parameters:
-
-
inst - TinyMCE editor control instance.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Method Detail
-
-
-
-
-
-
-
-
getBookmark
-
TinyMCE_Bookmark getBookmark(<boolean> simple)
-
-
Returns a selection bookmark that can be restored later with moveToBookmark.
- This acts much like the one MSIE has built in but this one is persistent if between DOM
- tree rewritings. The simple mode enables a quicker and non persistent bookmark.
-
-
-
-
-
- Parameters:
-
-
simple - If this is set to true, the selection bookmark will not me dom persistent.
-
-
-
-
-
-
-
-
- Returns:
-
- Selection bookmark that can be restored later with moveToBookmark.
-
-
-
-
-
-
-
-
-
-
-
getFocusElement
-
HTMLElement getFocusElement()
-
-
Returns the currently selected/focused element.
-
-
-
-
-
-
-
-
- Returns:
-
- Currently selected element.
-
-
-
-
-
-
-
-
-
-
-
getRng
-
DOMRange getRng()
-
-
Returns the browsers selections first range instance.
-
-
- TinyMCE_UndoRedo
-
- (<TinyMCE_Control> inst)
-
-
-
- Constructs a undo redo instance, this instance handles the custom undo/redo handeling in TinyMCE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-
- boolean
-
-
-
-
-
- add(<TinyMCE_UndoRedoLevel> l)
-
-
-
- Adds a new undo level, this will take a snapshot of the current instance HTML or use the specified level.
-
-
-
-
-
-
- void
-
-
-
-
-
- redo()
-
-
-
- Performes a undo action, this will restore the HTML contents of the editor to a former undoed state.
-
-
-
-
-
-
- void
-
-
-
-
-
- undo()
-
-
-
- Performes a undo action, this will restore the HTML contents of the editor to a former state.
-
-This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
-Class
-
-
-
-Each class has its own separate page. Each of these pages has three sections consisting of a class description, summary tables, and detailed member descriptions:
-
Class inheritance diagram
Direct Subclasses
Class declaration
Class description
-
-
Field Summary
Constructor Summary
Method Summary
-
-
Field Detail
Constructor Detail
Method Detail
-Each summary entry contains the first sentence from the detailed description for that item.
-
-
-
-Index
-
-The Index contains an alphabetic list of all classes, constructors, methods, and fields.
-
-Prev/Next
-These links take you to the next or previous class, interface, package, or related page.
-Frames/No Frames
-These links show and hide the HTML frames. All pages are available with or without frames.
-
-
-
-This help file applies to API documentation generated using the standard doclet.
-
-
-
-This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
-
-Link to Non-frame version.