Edit online

It is possible to customize the Oxygen XML Web Author user interface (including the side views, toolbars, contextual menu actions, and theme).

Customizing the Toolbar and Contextual Menu Actions

The Oxygen XML Web Author toolbar and contextual menu structure includes standard actions (such as Undo, Redo, Cut, etc.) as well as actions that are dictated by the framework configuration.

There are several methods you can use to customize the actions that appear on the toolbar and contextual menu:
Document Type Configuration in Oxygen XML Editor/Author
You can use the Document Type configuration dialog box in Oxygen XML Editor/Author (Options > Preferences > Document Type Association > [select framework] > Edit). This approach is entirely GUI-based and controls only the framework-specific configuration. You can add and remove actions, create drop-down sub-menus, or add separators.
Note: If the framework contains Author mode operations (Java implementations of the ro.sync.ecss.extensions.api.AuthorOperation interface), they can be enabled to be used by Oxygen XML Web Author using the ro.sync.ecss.extensions.api.WebappCompatible annotation. Author mode operations that use Java Swing components to display a graphical interface are not compatible with the Oxygen XML Web Author and they should not be annotated.
Web Author JavaScript API
You can use the Web Author JavaScript API to add custom actions or remove actions from the toolbar and contextual menu.
The advantages of using this approach include:
  • You can remove any action, even standard ones.
  • You can remove actions from all the places where they appear in the GUI.
  • You can dynamically remove actions (for example, based on the user role).
  • You can add actions that have a web-based GUI.

Customizing the Header Bar

If you embed Web Author in a web page, you may want to remove the header bar that displays the logo, the name of the file, and the name of the author. You can hide it using the hideAppBar() JavaScript API.

Customizing the Side Views

You can customize the side-views that appear in the editor by using the JavaScript API as described in the Customizing the Side Views tutorial.

Customizing the Theme

Although Web Author has a neutral theme, to better match the theme of your application, you can customize it by injecting a custom CSS file using JavaScript code from a plugin. The CSS file should also be served by your plugin using the WebappStaticResourcesFolder extension type.

Edit online

You can control whether or not the Change Tracking feature is enabled when a documented is opened in Oxygen XML Web Author by using a trackChanges flag set in a plugin.

Possible values for the trackChanges flag:
  • default - The status of the Change Tracking feature is determined by server's global options.
  • enabled - The Change Tracking feature is enabled but the user can disable it using the Toggle Change Tracking toolbar button.
  • forced - The Change Tracking feature is enabled and the user cannot disable it. The user can reject their own changes, but cannot accept or reject changes made by others.
You can set this flag in your plugin's JavaScript code like this:
goog.events.listen(workspace, 
sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED, function(e) {
    if(forced_track_changes_condition) {
      e.options.trackChanges = 'forced';
    } else if(track_changes_enabled_condition) {
      e.options.trackChanges = 'enabled';
    } else if(track_changes_default_condition) {
      e.options.trackChanges = 'enabled';
    }
  }); 
Tip: You can also use this flag in an embedded link that launches Web Author so that when a user clicks the constructed link, the documented will be opened in Web Author with the Change Tracking feature enabled.

Edit online

You can control the behavior of the Enter key. Normally the Enter key opens the content completion list, but you can set an option to make the Enter key work similar to the behavior in a normal word processor. The user still has the ability to open the content completion list by pressing CTRL+Enter.

There are several ways to control the behavior of the Enter key:
  • The Show content completion list when pressing Enter option in the General tab of the Administration page.
  • Set the ccOnEnter property in a plugin (using the LoadingOptions type definition from the Workspace API).
    Possible values for the ccOnEnter property:
    • true - When the user presses the Enter key, the content completion list will be displayed.
    • false - When the user presses the Enter key, it will work similar to the behavior in a normal word processor. For example, a new paragraph will be inserted, or the element will be spilt, or the same element will be inserted.

    You can set this property in your plugin's JavaScript code like this:

goog.events.listen(workspace, 
sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED, function(e) {
    if(non-technical-user) {
      e.options.ccOnEnter = 'false';
    }
  }); 
Tip: You can also use this property in an embedded link that launches Web Author so that when a user clicks the constructed link, the documented will be opened in Web Author with the Enter key working according to the value you set.

Edit online

The main editing pane includes a breadcrumb stripe at the bottom of the pane that shows the hierarchical XML structure of the current document. It is a helpful tool for users that want to be able to visualize or navigate the XML element structure within a document. If your users do not have a need for this breadcrumb, it is possible to hide it in the interface.

To hide the breadcrumb, set the hideBreadcrumb property in a plugin (using the LoadingOptions type definition from the Workspace API).

Possible values for the hideBreadcrumb property are:
  • false - The breadcrumb is visible in the interface.
  • true - The breadcrumb is not displayed in the interface.
You can set this property in your plugin's JavaScript code like this:
goog.events.listen(workspace, 
sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED, function(e) {
    e.options.hideBreadcrumb = 'true';
}); 
Tip: You can also use this property in an embedded link that launches Web Author so that when a user clicks the constructed link, the breadcrumb is not displayed.