Show Table Properties action for custom table

The default DITA framework that is bundled with Web Author provides an action called Table Properties that can be invoked from the contextual menu when the cursor is located anywhere inside a table. It opens a Table Properties dialog box where you can set specific properties for the table elements. The options that are available depend on the context and location within the table where the action was invoked.

Table Properties Action Implementation

The DITA Table Properties action implementation includes:

  • The configuration added in the .framework file where the action with the show.table.properties id [1] is created and added to the contextual menu actions list [2] (the JAVA AuthorOperation used for this action displays a dialog box specifically for the standalone version of Oxygen XML Editor, so the action must be customized with JavaScript code to be compatible with Web Author).
  • A table-show-properties-action.js JavaScript file that is included in the web folder of the framework. It contains the code that overwrites the original action added in the framework with an action (sync.table.ShowTablePropertiesAction) that displays a dialog box that is compatible with Web Author. It also contains code to determine the selected table (or table elements), the properties that can be set, and the server operation that will be used to set the chosen property values.

If you want to include a Table Properties action for a custom table structure in your framework, you can use the DITA Table Properties action implementation as an example and modify (or add) the code to identify your own table elements and to allow the editing of their specific properties.

[1] Actions Subtab [2] Contextual Menu Subtab