Class: BeforeEditorOpenedEvent

sync.api.Workspace.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
editor.load(options);
later to load the editor with the new options.

Example of listening for this event:

goog.events.listen(workspace, sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED, function(e) {
  // e is of type sync.api.Workspace.BeforeEditorOpenedEvent
});
Parameters:
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.
Source:

Members

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.
Type:
Source: