Aras Innovator Platform

2.6 Key Handling

Key handling in the Document Editor refers to how the editor responds to key events (e.g., Enter, Backspace, Delete, etc.). Although an author would seldom notice how key event handling is executed, how these events are processed are important in a structured document editor. This is because how key events are processed can significantly improve the user experience and provide more efficient authoring.

It is possible to enable extended key-handling logic, or create custom key-handlers, using CUI. This section describes the process for enabling extended key-handling logic to improve the authoring user experience by forcing the editor to behave more like common text editing or word-processing applications.

2.6.1 Enabling Extended Key-Handlers

A Document Type can be configured to reference OOTB key-handling logic that alters the standard functionality of the Document Editor for Technical Documents that reference that specific Document Type. This will affect how the Delete, Backspace, and Enter key functions execute for Text and List / List Item Document Elements.

For Text Elements, selecting the Enter Key while editing text within a sentence will automatically create and append a separate Text Document Element and place the cursor at the beginning of the line. Any text that existed after the cursor will be removed from the previous Text Document Element and pasted in the new Text Document Element. Similarly, when a Backspace Key is selected while the cursor is at the start of a Text Element will automatically cut the text from the current Document Element, paste it at the end of the previous Text Document Element, and remove the current Text Document Element. This operation is only done if there exists a preceding Text Document Element. The Delete Key executes in a similar way but only when the cursor is at the end of a Text Document Element and there exists a following, peer Text Document Element. Thus, these actions execute in a manner similar to how paragraphs are automatically split or merged in a typical text editor.

For Text Document Elements that are the last child of a List Item Document Element, selecting the Enter Key will result in the creation of a new List Item Element, with a Text Document Element child and place the cursor in the next Text Document Element. Any text that was after the previous cursor location will be cut and added to the new Text Document Element. Thus, these actions execute in a manner similar to how items in a list are created in a typical text editor.

These additional key handling features need to be configured for each Document Type as they are not added by default. To do so, add the ‘tdf.documenteditor.standard’ Presentation Configuration to the Editor Configuration property of the Document Type.

Note
The key handling logic in the ‘tdf.documenteditor.standard’ Presentation Configuration will process Text Document Elements and List Item Document Elements only.
Warning
When adding the Presentation Configuration, be sure to select the one with the name ‘tdf.documenteditor.standard’. There may be a Presentation Configuration instance with the name ‘tdf.editorconfiguration.standard [14.0.29 obsolete]’. This uses a version of the TDF Client API that is no longer supported with versions of Aras Innovator 36 and above.