Rate this page:
The Registry keeps track of all editor instances on a page, and acts as an event bus for registration/unregistration/mode switch events.
It also utilizes some Backbone.Events so you could also reference their documentation for the details.
Available events you can bind to:
All callbacks receive a corresponding editor's `entry` as an argument.
Every time an "event" happens it is namespaced by firing 4 different events, so you can bind to the particular editor's events:
E.g. when showing up "Comment" editor form with Text mode being default the following events will be fired:
then, when switching to Visual mode:
Entry class that keeps the current mode and references to editor's main components.
id
is assigned to the editor upon registration and you can get it from the entry in a register
callback. Type: String.Editor's current mode value. **Type: **String.
mode
part of the event name and entry.currentMode
property use 'source'
and 'wysiwyg'
values for Text and Visual mode correspondingly. But we strongly recommend using require('jira/editor/constants').Modes
object instead of raw values.
Method | Description |
---|---|
| Checks if editor described by the current entry is in the Text mode Return type:
Arguments: - |
| Checks if editor described by the current entry is in the Visual mode Return type:
Arguments: - |
| Binds callback to the Entry Arguments: callback: Function |
| Binds callback to the Return type: Entry Arguments: callback: Function |
| Binds callback to the Return type: Entry Arguments: callback: Function |
| Binds callback to the Return type: Entry Arguments: callback: Function |
| Executes callback on the current entry only if the editor is in the Text mode Return type: Entry Arguments: callback: Function |
| Executes callback on the current entry only if the editor is in the Visual mode Return type: Entry Arguments: callback: Function |
Rate this page: