Content Completion Assistant in Author Mode
One of the most useful features in Author mode is the content completion support. It offers a list of elements, attributes, attribute values, and other options that are valid in the current editing context.
Figure: Content Completion Assistant in Author Mode
The Content Completion Assistant is enabled by default. To disable it, open the Preferences dialog box , go to , and disable the Enable content completion option.
Using the Content Completion Assistant in Author Mode
When active, the Content Completion Assistant displays a list of context-sensitive proposals valid at the current cursor position. Elements can be selected in the list by using the Up and Down keys on your keyboard. For each selected item in the list, the Content Completion Assistant displays a documentation window. You can customize the size of the documentation window by dragging its top, right, and bottom borders.
To insert the selected content in Author mode, simply press Enter.
Types of Proposals Listed in the Content Completion Assistant
The Content Completion Assistant offers the following types of proposed actions:
- Insert allowed elements for the current context schema and the list of proposals contains elements depending on the elements inserted both before and after the cursor position.
- Insert element values if such values are specified in the schema for the current context.
- Insert new undeclared elements by entering their name in the text field.
- Insert CDATA sections, comments, processing instructions.
- Insert code templates.
- If invoked
on a selection that only contains an element start or end tag (remember that you can see all
element tags while working in
Full Tags
mode), it will allow you to rename the element. - If invoked on a selection of multiple elements or other content, it will allow you to surround the content with certain tags.
- If the Show all possible elements in the content completion list
option from the Schema-Aware preferences page is enabled,
the content completion pop-up window will present all the elements defined by the schema.
When choosing an element from this section, the insertion will be performed using the
schema-aware smart editing features.Note: By default, you are not allowed to insert element names that are not defined by the schema. This can be changed by deselecting the Allow only insertion of valid elements and attributes check box from the Schema-Aware preferences page.
Examples of How the Content Completion Assistant Works
- If the cursor is positioned at the beginning or at the end of the element, the first
item offered in the Content Completion Assistant is a
New <Element> item. Selecting this item will insert an
empty element.
Figure: Example (New [Element Name])
- If the cursor is positioned somewhere inside the element, the first entry in the
Content Completion Assistant is a Split
<Element> item. In most cases, you can only split the closest block
element to the cursor position, but if it is inside a list item, the list item will also
be proposed for split. Selecting Split <Element> splits the
content of the specified element around the cursor position.
Figure: Example (Split [Element Name])
- If the cursor is positioned inside a space preserved element (for example, a
code block), the first choice in the Content Completion
Assistant is Enter, which will insert a new line in
the content of the element, followed by New <Element>.
Figure: Example ('ENTER' New Line)
- If invoked
on a selection that only contains an element start or end tag (remember that you can see all
element tags while working in
Full Tags
mode), it will allow you to rename the element.Figure: Example (Rename)
- If invoked on a selection of multiple elements or other
content, it will allow you to surround the content with certain tags.
Figure: Example (Surround)