TinyMCE:API/tinymce.EditorManager/get
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: get
[edit]
Summary
Returns an editor instance by id.
[edit]
Syntax
<tinymce.Editor> get(<String> id)
[edit]
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.
[edit]
Returns
Editor instance to return.
[edit]
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!');
});
