Edit online

The Content Completion Assistant can be customized for Oxygen XML Web Author using similar methods that you would use to customize this feature in standalone distributions of Oxygen XML Editor/Author. There are several methods that you can use, including the following:

Customizing Content Completion in the Document Type Configuration Dialog Box

You can use the Document Type configuration dialog box to specify which elements or actions should be proposed in the Content Completion Assistant. To use this method, follow this procedure:
  1. Open the Preferences dialog box (Options > Preferences) and go to Document Type Associations.
  2. Select your document type and click the Extend button.
  3. Go to the Author tab and Content Completion subtab. In this subtab, you can specify:
    • Elements to remove from the proposals listed in the Content Completion Assistant.
    • Actions to be added to the proposals listed in the Content Completion Assistant.
      Note: To add an action that is implemented in JavaScript, you need to define a stub action with the same ID in the Actions subtab and add it in the Content Completion subtab.
      The stub action will be automatically registered in the JavaScript code in the sync.api.ActionsManager object with the ID you specified. Make sure that when your JavaScript action implementation is registered in the sync.api.ActionsManager, it overwrites the stub action. A sample code to do this:
      goog.events.listen(editor, sync.api.Editor.EventTypes.ACTIONS_LOADED, 
        function(e) {
          if (actionsManager.getActionById('my_id') != null) {
            actionsManager.registerAction('my_id', new MyCustomAction());
          }
        });
      ...
  4. Create an archive that only contains your custom framework folder and upload the changes to your framework to Web Author.

Customizing Content Completion Using a Configuration File

You can use a cc_config.xml configuration file for your custom framework to configure the values that are proposed in certain contexts, to customize the attributes or elements that are proposed, or to customize how certain aspects of the proposals are rendered in the interface. You would then save the configuration file in the resources folder inside your custom framework directory and upload your framework to Web Author.

Customizing the Elements Order in the Content Completion Assistant

You can customize the order of the elements presented by the Content Completion Assistant by increasing their priority values. To do this, you should implement the methods exposed in the ContentCompletionSortPriorityAssigner API.

Changing the Keyboard Shortcut for Invoking the Content Completion Assistant

By default, the Content Completion Assistant is invoked automatically when you press Enter. For non-technical users, it may be helpful to disable this feature and use the default behavior of typical word processors where pressing Enter will insert a new paragraph. For information about how to achieve this, see Control the Behavior of the Enter Key.