tinymce.Editor

This class contains the core logic for a TinyMCE editor.

Examples

// Add a class to all paragraphs in the editor.
tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass');

// Gets the current editors selection as text
tinyMCE.activeEditor.selection.getContent({format : 'text'});

// Creates a new editor instance
var ed = new tinymce.Editor('textareaid', {
    some_setting : 1
});

// Select each item the user clicks on
ed.onClick.add(function(ed, e) {
    ed.selection.select(e.target);
});

ed.render();

Properties

Property Defined By
Name/value collection with editor settings.
tinymce.Editor
Editor instance id, normally the same as the div/textarea that was replaced.
tinymce.Editor
State to force the editor to return false on a isDirty call.
tinymce.Editor
Name/Value object containting plugin instances.
tinymce.Editor
URI object to document configured for the TinyMCE instance.
tinymce.Editor
URI object to current document that holds the TinyMCE editor instance.
tinymce.Editor
Array with CSS files to load into the iframe.
tinymce.Editor
Window manager reference, use this to open new windows and dialogs.
tinymce.Editor
Reference to the theme instance that was used to generate the UI.
tinymce.Editor
Control manager instance for the editor.
tinymce.Editor
Schema instance, enables you to validate elements and it's children.
tinymce.Editor
DOM instance for the editor.
tinymce.Editor
HTML parser will be used when contents is inserted into the editor.
tinymce.Editor
DOM serializer for the editor.
tinymce.Editor
Selection instance for the editor.
tinymce.Editor
Formatter instance.
tinymce.Editor
Undo manager instance, responsible for handling undo levels.
tinymce.Editor
Is set to true after the editor instance has been initialized
tinymce.Editor

Methods

Method Defined By
Constructs a editor instance by id.
tinymce.Editor
Renderes the editor/adds it to the page.
tinymce.Editor
Initializes the editor this will be called automatically when all plugins/themes and language packs are loaded by the re...
tinymce.Editor
This method get called by the init method ones the iframe is loaded.
tinymce.Editor
Focuses/activates the editor.
tinymce.Editor
Executes a legacy callback.
tinymce.Editor
Translates the specified string by replacing variables with language pack items it will also check if there is a key mat...
tinymce.Editor
Returns a language pack item by name/key.
tinymce.Editor
Returns a configuration parameter by name.
tinymce.Editor
Distpaches out a onNodeChange event to all observers.
tinymce.Editor
Adds a button that later gets created by the ControlManager.
tinymce.Editor
Adds a custom command to the editor, you can also override existing commands with this method.
tinymce.Editor
Adds a custom query state command to the editor, you can also override existing commands with this method.
tinymce.Editor
Adds a custom query value command to the editor, you can also override existing commands with this method.
tinymce.Editor
Adds a keyboard shortcut for some command or function.
tinymce.Editor
Executes a command on the current instance.
tinymce.Editor
Returns a command specific state, for example if bold is enabled or not.
tinymce.Editor
Returns a command specific value, for example the current font size.
tinymce.Editor
Shows the editor and hides any textarea/div that the editor is supposed to replace.
tinymce.Editor
Hides the editor and shows any textarea/div that the editor is supposed to replace.
tinymce.Editor
Returns true/false if the editor is hidden or not.
tinymce.Editor
Sets the progress state, this will display a throbber/progess for the editor.
tinymce.Editor
Loads contents from the textarea or div element that got converted into an editor instance.
tinymce.Editor
Saves the contents from a editor out to the textarea or div element that got converted into an editor instance.
tinymce.Editor
Sets the specified content to the editor instance, this will cleanup the content before it gets set using the different ...
tinymce.Editor
Gets the content from the editor instance, this will cleanup the content before it gets returned using the different cle...
tinymce.Editor
Returns true/false if the editor is dirty or not.
tinymce.Editor
Returns the editors container element.
tinymce.Editor
Returns the editors content area container element.
tinymce.Editor
Returns the target element/textarea that got replaced with a TinyMCE editor instance.
tinymce.Editor
Returns the iframes window object.
tinymce.Editor
Returns the iframes document object.
tinymce.Editor
Returns the iframes body element.
tinymce.Editor
URL converter function this gets executed each time a user adds an img, a or any other element that has a URL in it.
tinymce.Editor
Adds visual aid for tables, anchors etc so they can be more easily edited inside the editor.
tinymce.Editor
Removes the editor from the dom and tinymce collection.
tinymce.Editor
Destroys the editor instance by removing all events, element references or other resources that could leak memory.
tinymce.Editor