History | Edit

Oxygen XML Web Author can be embedded in a CMS to offer editing functionality for documents stored in the CMS. It can also be embedded in other web applications.

Web Author has two parts that need to be considered when integrating:
  1. A front-end HTML page that should be embedded using an iframe (load the main page (app/oxygen.html) in an iframe). Some of its options can be controlled using URL parameters and other by using the JS API from an editor plugin.
  2. The Java-based back-end that can also be customized using plugins.
    Note: It is recommended to deploy the back-end separately from your application. More details here: Sharing a Tomcat Instance.

Security Restrictions

Oxygen XML Web Author uses cookies to enforce its licensing and to maintain the editing state of the opened documents. Some browsers block third-party cookies for security reasons. To avoid having the cookies blocked, Oxygen XML Web Author should be served from the same origin as the CMS host page.

Passing Parameters to the Editor

To control the editor, you can use URL parameters. To pass custom parameters, you can implement a plugin for Oxygen XML Web Author that contains JavaScript code to interpret those parameters.

Communicating with the Editor

To communicate with the editor, you can send messages between the host CMS page and the Oxygen XML Web Author page.

Browsers offer the window.postMessage JavaScript API that allows messages to be sent between pages. To receive the message, create a plugin for Oxygen XML Web Author that contains JavaScript code that listens for the messages sent by the CMS host page and uses the Oxygen XML Web Author JavaScript API to implement the required functionality.

Other Notes

  • We experienced problems if the iframe is hidden while loading using display: none. You can use visibility: hidden for the same purpose.
  • Some XML vocabularies (for example, DITA) support cross-document links. By default, clicking on a cross-document link will open that document in the Oxygen XML Web Author in another browser tab. If the editor is embedded, you may want to change this behavior using the sync.api.Editor.EventTypes.LINK_OPENED event that is triggered on the sync.api.Editor instance.
  • When embedded in a larger page, sometimes it makes sense to remove the gray app-bar that contains the application logo, file name, and user name. To do this, you can use the workspace.getViewManager().hideAppBar(); API.
  • It is possible to customize the Oxygen XML Web Author user interface through the use of JavaScript APIs. For more information, see Customizing Web Author User Interface.