The Oxygen XML WebApp has a user-friendly Dashboard and if
a particular plugin registers a create or open action, then it will include sections for
creating and opening documents for plugin integrations.
Register Create and Open actions for Oxygen XML WebApp
Dashboard
To register
Create and
Open actions,
follow these steps:
- Create a
plugin that has a plugin.js file in its
web folder.
- In the plugin.js file, add code similar to the following
example:
var initialUrl = 'file:/[PATH_TO_RESOURCE_FOLDER]';
var createAction = new sync.api.CreateDocumentAction(
new sync.api.FileBrowsingDialog({initialUrl : initialUrl}));
createAction.setActionName('New Document');
var openAction =new sync.actions.OpenAction(
new sync.api.FileBrowsingDialog({initialUrl : initialUrl}));
openAction.setActionName('Open Document');
var actionsManager = workspace.getActionsManager();
actionsManager.registerCreateAction(createAction);
actionsManager.registerOpenAction(openAction);
- Deploy the
plugin in the Oxygen XML WebApp.
The registered
create action will appear in the
New section
on your
Dashboard, while a registered
open action will appear in
the
Open section.
Create a New Document
To create a new document, follow these steps:
- Go to your Oxygen XML WebApp
Dashboard page.
- Click the New Document action in the New
section. This opens a dialog box that allows you to select a new file template.
- Select a file template click OK. This opens a dialog box that
allows you browse for a destination path.
- Select a destination path and name for the new document.
The new document will be opened in a new tab.
Open a Document
To open a document, follow these steps:
- Go to your Oxygen XML WebApp
Dashboard page.
- Click the Open Document action in the Open
section. This opens a dialog box that allows you to browse for a file.
- Select the file and click OK.
The selected document will be opened in a new tab.