TinyMCE:API/tinymce.EditorManager/get

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: get

Summary

Returns an editor instance by id.

Syntax

<tinymce.Editor> get(<String> id)

Parameters

id
Editor instance id to return. The id is normally the name of the textarea or the id of the div that got replaced with an editor.

Returns

Editor instance to return.

Examples

// Adds an onclick event to an editor by id (shorter version)
tinyMCE.get('mytextbox').onClick.add(function(ed, e) {
   ed.windowManager.alert('Hello world!');
});

// Adds an onclick event to an editor by id (longer version)
tinymce.EditorManager.get('mytextbox').onClick.add(function(ed, e) {
   ed.windowManager.alert('Hello world!');
});
Personal tools