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
}, tinymce.EditorManager);

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

ed.render();

Properties

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

Events

Event Defined By
Fires after an undo level has been added to the editor
tinymce.Editor
Fires before an undo level is added to the editor
tinymce.Editor
Fires before a execCommand call is made
tinymce.Editor
Fires before the UI gets rendered
tinymce.Editor
Fires before contents is inserted into the editor
tinymce.Editor
Fires after a execCommand call has been made
tinymce.Editor
Fires after contents has been extracted from the editor
tinymce.Editor
Fires after contents has been loaded into the editor
tinymce.Editor
Fires when the selection is moved to a new location or is the DOM is updated by some command
tinymce.Editor
Fires when a resize of an object like an image is about to start
tinymce.Editor
Fires after an object like an image is resized
tinymce.Editor
Fires when an object is selected such as an image
tinymce.Editor
Fires after the contents has been processed
tinymce.Editor
Fires before the editor has been initialized
tinymce.Editor
Fires before the contents is processed
tinymce.Editor
Fires when a progress event is made
tinymce.Editor
Fires after contents has been saved/extracted from the editor
tinymce.Editor
Fires when attributes are updated on DOM elements
tinymce.Editor
Fires when the focus is moved from one editor to another editor
tinymce.Editor
Fires when the editor is blurred
tinymce.Editor
Fires when contents is modified in the editor
tinymce.Editor
Fires when the focus is moved from one editor to another editor
tinymce.Editor
Fires when the editor gets focused
tinymce.Editor
Fires when the editor is hidden
tinymce.Editor
Fires after the editor has been initialized
tinymce.Editor
Fires when an redo operation is executed
tinymce.Editor
Fires when the editor instance is removed
tinymce.Editor
Fires when the form containing the editor is resetted
tinymce.Editor
Fires when the editor is shown
tinymce.Editor
Fires when the form containing the editor is submitted
tinymce.Editor
Fires when an undo operation is executed
tinymce.Editor

Constructors

Method Defined By
Constructs a editor instance by id
tinymce.Editor

Methods

Method Defined By
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 menu item to be used in the menus of the modern theme
tinymce.Editor
Adds a custom query state command to the editor, you can also override existing commands with this m
tinymce.Editor
Adds a custom query value command to the editor, you can also override existing commands with this m
tinymce.Editor
Adds a keyboard shortcut for some command or function
tinymce.Editor
Adds visual aid for tables, anchors etc so they can be more easily edited inside the editor
tinymce.Editor
URL converter function this gets executed each time a user adds an img, a or any other element that
tinymce.Editor
Destroys the editor instance by removing all events, element references or other resources that coul
tinymce.Editor
Executes a legacy callback
tinymce.Editor
Executes a command on the current instance
tinymce.Editor
Fires the specified event by name
tinymce.util.Observable
Focuses/activates the editor
tinymce.Editor
Returns the iframes body element
tinymce.Editor
Returns the editors container element
tinymce.Editor
Gets the content from the editor instance, this will cleanup the content before it gets returned usi
tinymce.Editor
Returns the editors content area container element
tinymce.Editor
Returns the iframes document object
tinymce.Editor
Returns the target element/textarea that got replaced with a TinyMCE editor instance
tinymce.Editor
Returns a language pack item by name/key
tinymce.Editor
Returns a configuration parameter by name
tinymce.Editor
Returns the iframes window object
tinymce.Editor
Hides the editor and shows any textarea/div that the editor is supposed to replace
tinymce.Editor
Initializes the editor this will be called automatically when all plugins/themes and language packs
tinymce.Editor
This method get called by the init method ones the iframe is loaded
tinymce.Editor
Inserts content at caret position
tinymce.Editor
Returns true/false if the editor is dirty or not
tinymce.Editor
Returns true/false if the editor is hidden or not
tinymce.Editor
Loads contents from the textarea or div element that got converted into an editor instance
tinymce.Editor
Distpaches out a onNodeChange event to all observers
tinymce.Editor
Unbinds an event listener to a specific event by name
tinymce.util.Observable
Binds an event listener to a specific event by name
tinymce.util.Observable
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
Removes the editor from the dom and tinymce collection
tinymce.Editor
Renderes the editor/adds it to the page
tinymce.Editor
Saves the contents from a editor out to the textarea or div element that got converted into an edito
tinymce.Editor
Sets the specified content to the editor instance, this will cleanup the content before it gets set
tinymce.Editor
Sets the progress state, this will display a throbber/progess for the editor
tinymce.Editor
Shows the editor and hides any textarea/div that the editor is supposed to replace
tinymce.Editor
Translates the specified string by replacing variables with language pack items it will also check i
tinymce.Editor