D IT A support
This add-on provides DITA 1.2 / 1.3 support for Fonto applications. It does not pre-configure any elements, but provides other functionality necessary or helpful for configuring editors to use DITA-based schemas.
D IT A maps
The topicref structure in DITA map documents loaded into the editor is processed, and any documents referred to by these topicrefs are loaded automatically. This currently requires all topicrefs to use permanent IDs for their references.
To correctly visualize DITA maps as sheet frames, use the configureAsMapSheetFrame family provided by this add-on.
Map mutations
Support for editing the structure of DITA maps is provided through a number of operations. To use these, configure them as contextual operations for map, topicref and related elements. The structure view will automatically show a menu for the contextual operations for any topicref, as well as for the element it points to.
This package provides the following operations:
-
contextual-topicref-move-up
,contextual-topicref-move-down
,contextual-topicref-indent
,contextual-topicref-outdent
,contextual-topicref-move-to-top
,contextual-topicref-move-to-bottom
: move topicref in the map. UseTOPICREF_MOVEMENT_OPERATION_NAMES
to include the whole set. -
contextual-topicref-remove
: remove topicref from the map -
append-topicref
: invoke from another operation to append a topicref, passingcontextNodeId
for the node the topicref to insert under points to,documentId
for the local ID of the target document, andtargetHref
for the value to set for the topicref's href attribute.
To avoid duplicate operations from showing up in the structure view menu, we recommend using a configuration similar to the following:
Other
// A map by itself can not be moved or removed, only allow insertion of topicrefs using an application-defined operation
configureContextualOperations(sxModule, 'fonto:dita-class(., "map/map")', [
{ name: 'my-topicref-insert-operation' }
]);
// Topicrefs allow insertion as well as movement and removal
configureContextualOperations(sxModule, 'fonto:dita-class(., "map/topicref")', [
{ name: 'my-topicref-insert-operation' },
{ name: 'contextual-topicref-move-up' },
{ name: 'contextual-topicref-move-down' },
{ name: 'contextual-topicref-indent' },
{ name: 'contextual-topicref-outdent' },
{ name: 'contextual-topicref-move-to-top' },
{ name: 'contextual-topicref-move-to-bottom' },
{ name: 'contextual-topicref-remove' }
]);
// It is not possible to insert under a mapref, nested topicrefs should be inserted under the target map instead
// Therefore, only allow movement and removal operations for mapref
configureContextualOperations(sxModule, 'fonto:dita-class(., "map/mapref")', [
{ name: 'contextual-topicref-move-up' },
{ name: 'contextual-topicref-move-down' },
{ name: 'contextual-topicref-indent' },
{ name: 'contextual-topicref-outdent' },
{ name: 'contextual-topicref-move-to-top' },
{ name: 'contextual-topicref-move-to-bottom' },
{ name: 'contextual-topicref-remove' }
]);
Conrefs
Read-only rendering of conrefs is supported using the configureAsConref family.
Tables
Support for DITA simpletable
s is included in this add-on. Use the configureAsSimpletableTableElements function to configure these elements for your application. For CALS table
s, use the fontoxml-table-flow-cals add-on.