Class: BeforeEditorOpenedEvent


new BeforeEditorOpenedEvent(type, editor, options)

Event generated before the editor is loaded. Its usage include:
  • adding new actions to the editor's action manager.
  • changing the startup options of the editor.
If the options can only be computed asynchronously, one can cancel the editor loading with preventDefault and call
later to load the editor with the new options.

Example of listening for this event:, sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED, function(e) {
  // e is of type sync.api.Workspace.BeforeEditorOpenedEvent
Name Type Description
type string The type of the event.
editor sync.api.Editor The editor that was loaded.
options sync.api.Workspace.LoadingOptions The options used to open the editor.


options :sync.api.Workspace.LoadingOptions

The options used to load the editor. If these options are changed during the sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED, they will be taken into account during the editor loading.