Developers working with the Oxygen XML Editor can now enhance their custom frameworks by integrating support for CALS tables, a widely used table format in DITA and DocBook documents. This addition allows for more streamlined editing capabilities, including selecting, resizing columns, and performing actions such as inserting or deleting rows and columns.

For those managing documents from other vocabularies that utilize CALS structures, achieving similar editing features is possible through a couple of methods. One effective approach is to utilize a plugin that introduces CALS table editing support along with specific table-related actions. Developers can find this plugin available on GitHub at the following link: https://github.com/oxygenxml/web-author-sample-plugins/tree/master/web-author-CALS-table-plugin.

Integrating CALS Table Support into Custom Frameworks

Another option involves customizing the existing framework configuration. If you have already created a framework tailored to your document’s vocabulary, the next step is to extract CALS table support from the DocBook framework and incorporate it into your custom framework. The rationale for choosing DocBook over DITA as a reference is due to its more general element-name orientation, which simplifies the integration process.

To begin this process, developers should copy the following CSS files from the DocBook framework:
– [oXygen_install_dir]frameworks/docbook/css/cals_table.css
– [oXygen_install_dir]frameworks/docbook/css/html_cals_table.css

These files should be placed into the CSS directory of your framework. In the Document Type edit dialog, under the Author tab and CSS sub-tab, the entry ${framework}/css/cals_table.css must be added to ensure proper rendering of tables in Author mode.

Implementing Table-Related Actions

The next step is to implement table-related actions found in the DocBook framework. Developers should copy the file [oXygen_installation_dir]frameworks/docbook/docbook.jar into their framework directory. This JAR file contains the essential classes required for table operations. In the Document Type edit dialog, navigate to the Classpath tab to add the docbook.jar from your framework directory to the list of paths. This will grant access to all table operations associated with your framework.

For each table action, it is necessary to define a corresponding action within the Document Type configuration dialog. Detailed information on how to set this up can be found in the official Oxygen documentation here: https://www.oxygenxml.com/doc/ug-editor/#topics/the-action-dialog.html. By examining the properties of the corresponding DocBook action, developers can identify the required attributes such as ID, name, icons, enabling conditions, and specific operations tailored for CALS tables.

To finalize the integration, developers can add these actions to various user interface elements. This includes menu options, toolbars, and contextual menus. In the Document Type configuration dialog, navigate to the Author tab. Under the Menu sub-tab, select the desired action from the Available actions section and add it to the Current action section. This same process applies to the contextual menu and toolbar sub-tabs.

If implemented correctly, your custom framework will effectively support the standard CALS table naming mechanism, enabling proper handling of tables for both display and related operations. This enhancement not only improves usability but also streamlines editing processes, ultimately benefiting users who rely on CALS tables for their documentation needs.