Class: Workspace

sync.api.Workspace

new Workspace()

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

Extends

  • goog.events.EventTarget

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. Note that frameworks code cannot use this event since the framework is detected while the document is loaded.
See sync.api.Workspace.BeforeEditorOpenedEvent for more details.
EDITOR_LOADED string Triggered after the editor was loaded.
See sync.api.Workspace.EditorLifecycleEvent for more details.
BEFORE_DASHBOARD_LOADED string Triggered before the dashboard is loaded.
See sync.api.Workspace.DashboardLifecycleEvent for more details.
DASHBOARD_LOADED string Triggered after the dashboard was loaded.
See sync.api.Workspace.DashboardLifecycleEvent for more details.
Source:

Methods

addRelativeReferencesResolver(protocol, resolver)

Web Author prefers to insert the external references as relative URLs. It has a default algorithm to make an URL relative to a given base. However, you for certain URL protocols you can provide your own algorithm.
Parameters:
Name Type Description
protocol string The protocol handled by the resolver.
resolver function The relative references resolver. The first argument the URL used as a base for relativization and the second one is is the URL to make relative .
Source:

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

makeRelative(base, url) → {string}

Makes an URL relative to the base.
Parameters:
Name Type Description
base string The relativization base, needs to be an absolute URL.
url string The URL to make relative.
Source:
Returns:
The relative URL.
Type
string

setUrlChooser(urlChooser)

Sets the URL chooser used when the user is asked to provide an 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
trackChanges string <optional>
Flag that controls whether the editor should track changes or not. Possible values:
  • default - The status of change tracking is determined by server's global options.
  • enabled - Change tracking is enabled but the user can disable it using a toolbar action.
  • forced - Change tracking is enabled and the user cannot disable it, not can she accept or reject any changes.
If you use other option than 'default', the server change tracking status (as configured in the Administration Page) should not be "Stored in the document".
autoSaveInterval number <optional>
the interval of time (in seconds) to wait until an auto-save is performed. If <= 0 or falsy, auto-save is disabled.
contentType string <optional>
The content type of the edited document, "text/xml" for XML documents.
Source: