Customizing Oxygen XML Web Author Component PluginsHistory | Edit
The Oxygen XML Web Author Component server side can be customized with a variety of plugin types. We currently provide support for the following extension types:
- URLStreamHandler - This extensions can be used to integrate the Oxygen XML Web Author Component with XML databases or CMS. There is an example URLStreamHandler
provided in Oxygen XML SDK project in the
oxygen-sample-plugins/oxygen-sample-plugin-custom-protocol folder.
The extension uses the cproto protocol to access the file system of the server and
can be used as a starting point.Note: For more details about implementing an authentication mechanism, see Implementing a CMS Authentication Mechanism.
- WorkspaceAccess - Most of the methods used to configure the Oxygen XML Editor
GUI are unavailable in theses extensions, but they can still be used, for example, to
configure a
javax.xml.transform.URIResolver.Note: The ro.sync.exml.workspace.api.PluginWorkspace instance passed to the extension also implements the ro.sync.ecss.extensions.api.webapp.access.WebappPluginWorkspace interface and provides access to some Oxygen XML Web Author Component-specific functionality. - WebappServlet - This extension allows you to provide an implementation of a servlet-like interface (ro.sync.ecss.extensions.api.webapp.plugin.WebappServletPluginExtension) that will be dynamically loaded by the Oxygen XML Web Author Component. Your implementation will also provide the path to the location where the servlet will be exposed.
- AuthorStylesheet - Allows you to add a stylesheet (CSS or LESS) used for rendering all XML documents.
-
WebappStaticResourcesFolder - This extension allows you to access a static resource
folder. It should provide a
pathattribute (the static resources folder path relative to the plugins directory) and anhrefattribute that declares the plugin. An example of a use-case is you can use it to have the Oxygen XML Web Author Component provide icons for plugin-specific actions.In the following example, the static resources will be available at [OXYGEN_WEBAUTHOR_INSTALL_DIR]/plugin-resources/relative-href/path-to-file, with the path-to-file being relative to the static resources folder:<extension type="WebappStaticResourcesFolder" path="path-to-resorce-folder" href="relative-href"/>
Loading plugin-related custom JavaScript code
If your plugin needs accompanying JavaScript code to be loaded and executed on the client-side you can bundle it together with your plugin code. The Oxygen XML Web Author Component loads all files with the .js extension located in the web folder of the plugin. The files are loaded in lexicographical order, meaning that their alphabetical order is based upon the total order rather than sequence (for example, abc10.js would be loaded before abc2.js).
Adding the Plugins in the Oxygen XML Web Author Component
If you have already developed such Oxygen XML Editor plugins, they can be added in the bundle-plugin/dropins folder in the Maven project.
If you are developing a new Oxygen XML Editor plugin you are encouraged to use as a starting point any of the existing plugins. Then you should add the resulting Maven project as a dependency (or even a sub-module) in the oxygen-sample-plugins module.
Public Plugin Integration Projects
- WebDAV Support for oXygen XML Web Author (https://github.com/oxygenxml/webapp-webdav-integration) - This project is a very simple integration of Oxygen XML Web Author Component with a WebDAV-enabled server, which can be extended with more features or can be adapted to work with any CMS.
- Here is a list with all open-source Oxygen XML Web Author Component plugins provided by Oxygen. For example, there are plugins for integrating with Google Drive, editing files in a GitHub repository, adding support for special UTF-8 characters, implementing REST-endpoints for content handling, and more.