Class: Workspace

Workspace

new Workspace()

Access to the Workspace in which the editor is opened.
Source:

Classes

BeforeEditorOpenedEvent
DashboardLifecycleEvent
EditorLifecycleEvent

Members

(static) EventType :string

The types of the Workspace events.
Type:
  • string
Properties:
Name Type Description
BEFORE_EDITOR_LOADED string Triggered before the editor content was loaded. See the sync.api.Workspace.BeforeEditorOpenedEvent description for more details. Note that frameworks code cannot use this event since the framework is detected while the document is loaded.
EDITOR_LOADED string Triggered after the editor was loaded.
BEFORE_DASHBOARD_LOADED string Triggered before the dashboard is loaded.
DASHBOARD_LOADED string Triggered after the dashboard was loaded.
Source:

Methods

createDialog(opt_idopt) → {sync.api.Dialog}

Creates a dialog that can have custom content and behavior. The advandatage of using this method is that the dialog will have a consistent appearance with the rest of the application and that it will work on all devices supported by the WebApp.
Parameters:
Name Type Attributes Description
opt_id string <optional>
The id that will be given to the dialog box. For example, you can use it for specifying the width of the dialog in CSS.
Source:
Returns:
The dialog.
Type
sync.api.Dialog

getNotificationManager() → {sync.api.NotificationsManager}

Returns an object that can be used to display notifications to the user.
Source:
Returns:
the notifications manager.
Type
sync.api.NotificationsManager

getViewManager() → {sync.view.ViewManager}

Returns the view manager helper object that can be used to customize oXygen XML WebApp views.
Source:
Returns:
The view manager.
Type
sync.view.ViewManager

setUrlChooser(urlChooser)

Sets the URL chooser used when the user is asked to provide and URL. When there is not chooser set, the user will usually have to enter the URLs in a text field.
Parameters:
Name Type Description
urlChooser sync.api.UrlChooser The URL chooser to set.
Source:

Type Definitions

LoadingOptions

The object used to open the editor.
Type:
  • Object
Properties:
Name Type Attributes Description
url string The URL of the document.
title string <optional>
The title of the document. If not specified, it is inferred from URL.
userName string <optional>
The name of the user which will edit the document. Used as the author for comments and displayed in the top-right corner. If not specified, it is inferred from the author URL variable.
content string <optional>
The content of the document. If not specified, the server will load the content from the given URL.
modes string <optional>
The available editing modes, comma-separated. If multiple values are passed in, the first one will be active and the user can switch to another one using the GUI. Possible values:
  • review - only the review actions are enabled
  • edit - full editing support is enabled
Source: