Textbox.io Editor instances are represented by editor. Instances are created by replace, replaceAll, inline, and inlineAll. You can also get editor instances by calling the get or getActiveEditor() methods.
The editor instance allows you to interact with a specific editor's editor.content and editor.events.
Properties
editor.content | Groups methods relating to an editor instance's content. |
editor.events | Groups methods relating to an editor instance's event model. |
editor.filters | Groups properties relating to an editor instance's content filters. |
editor.macros | Groups properties relating to an editor instance's macros. |
mode | Provides methods to set/get the editor's mode to either |
Methods
element | Returns the editor container DOM element. |
focus | Focus a Textbox.io editor instance. |
message | Display a message banner in the editor UI. |
restore | Removes this Textbox.io Editor instance from its DOM element. |
Note
get returns arrays of editor instances. The examples in this section assume a single editor - the first editor instance in the returned array.
// Retrieve the first editor instance in the returned array
var editors = textboxio.get('textarea');
var editor = editors[0];