Edit online

Content Completion Subtab

In the Content Completion subtab you configure what framework-specific the Content Completion Assistant proposes. The subtab is divided into two sections: Available actions and Current actions.

To open the Content Completion subtab, open the Preferences dialog box (Options > Preferences), go to Document Type Association, use the New, Edit, Duplicate, or Extend button, click on the Author tab, and then the Content Completion subtab.

Available and Current Actions

The Available actions section presents a table that displays the actions defined in the Actions subtab, along with their icon, ID, and name. The Current actions section holds the actions that the Content Completion Assistant proposes when you work with a document that belongs to the edited framework.

To add the selected available action as a sibling of the currently selected action in the Current actions section, use the Add as sibling button. To add it as a child of the currently selected action, use the Add as child button. To edit an existing action, select it and use the Edit button. To remove an existing action, use the Remove button. You can also move items up and down the list using the Move Up or Move Down buttons.

Adding an action (or editing an existing one) opens the Content Completion Item dialog box.

Figure 1. Content Completion Item Dialog Box
Use this dialog box to configure the action:
Action
Displays the name of the selected action.
Display name
You can use the drop-down menu to choose between displaying the action name or the replaced element name, or you can enter another name to be displayed.
Replacement for

Use this section to replace an existing element with the configured action:

  • Element name and Namespace - The name (and namespace, if needed) of the replaced element. The original element no longer needs to be excluded using the Filter - Remove content completion items table.
  • Display item only when element is allowed at cursor - The configured action is contributed in the UI components selected in the Contribute to section only if the associated schema allows the original element at the current location in the document. This is equivalent to defining activation XPaths in the Author Action dialog box using the oxy:allows-child-element() XPath extension function. Activation XPaths for the action are still checked when the action is invoked.
Contribute to
Use this section to specify where to display the configured item in the interface:
  • Content Completion Window - The configured item will appear in the Content Completion Assistant.
  • Elements View - The configured item will appear in the Elements view.
  • Element Insert Menus - The configured item will appear in the Append Child, Insert Before, or Insert After menus that are available in certain contextual menus (for example, the contextual menu of the Outline view).

Filter Table

The Filter section presents a table that allows you to add elements to be filtered from the Content Completion Assistant or from some specific helper views or menus. Use the Add button to add more filters to the table, the Edit button to modify an existing item in the table, or the Remove button to remove a filtered item. The Add and Edit buttons open a Remove item dialog box.

Figure 2. Remove Item Dialog Box
Use this dialog box to add or configure the elements that will be filtered:
Item name

Use this text field to enter the name of the element to be filtered. The drop-down list also includes a few special content completion actions that can be filtered:

  • <SPLIT> [elementName] - Filters split entries for elements that have the form Split elementName or New elementName.
  • <SPLIT> - Filters split entries for all elements.
  • <ENTER> - Filters Insert New Line entries that appear in elements where whitespace is significant.

The filter list can be used to remove only content completion items contributed by the schema associated to the document and it does not remove actions added to the content completion list via the framework configuration. The element name specified in the filter is not namespace aware, it matches the name of the element defined in the associated schema exactly as it would appear rendered in the content completion window.

Note: If you try to insert an element in an invalid position (for example, using the content completion assistant), the editor will attempt to make the insertion valid. This may mean finding an alternate position for the insertion or splitting the element at the current position. If a <SPLIT> entry is added in the filter list for an element, the editor will never split that element.
Remove item from
You can choose to filter the element from any of the following:
  • Content Completion Window - The element will not appear in the Content Completion Assistant.
  • Elements View - The element will not appear in the Elements view.
  • Element Insert Menus - The element will not appear in the Append Child, Insert Before, or Insert After menus that are available in certain contextual menus (for example, the contextual menu of the Outline view).