One of the most useful feature in Author editor is the content completion support. The fastest way to invoke it is to press (Enter) or (Ctrl + Space) (on Mac OS X the shortcut is (Meta + Space)) in the editor panel.
Content completion window offers the following types of actions:
If you press (Enter) the displayed content completion window will contain as first entries the Split <Element name> items. Usually you can only split the closest block element to the caret position but if it is inside a list item, the list item will also be proposed for split. Selecting Split <Element name> splits the content of the specified element around the caret position. Thus, if the caret is positioned at the beginning or at the end of the element, the newly created sibling will be empty.
If the caret is positioned inside a space preserve element the first choice in the content completion window is Enter which inserts a new line in the content of the element. If there is a selection in the editor and you invoke content completion, a Surround with operation can be performed. The tag used will be the selected item from the content completion window.
By default you are not allowed to insert element names which are not considered by the associated schema as valid proposals in the current context. This can be changed by unchecking the Allow only insertion of valid elements and attributes check box from the Schema aware preferences page.
Joining two elements - You can choose to join the content of two sibling elements with the same name by using the
action.In either of the described cases, if the element has no sibling or the sibling element has a different name, Unwrap operation will be performed automatically.
Unwrapping the content of an element - You can unwrap the content of an element by deleting its tags using the
action from the editor contextual menu.The same action can be triggered in the next situations:
Removing all the markup of an element - You can remove the markup of the current
element and keep only the text content with the action
Remove All Markup available on
the submenu Refactoring of the contextual menu and on the toolbar
XML Refactoring.
When you press (Delete) or (Backspace) in the presented cases the element is unwrapped or it is joined with its sibling. If the current element is empty, the element tags will be deleted.
When you click on a marker representing the start or end tag of an element, the entire element will be selected. The contextual menu displayed when you right-click on the marker representing the start or end tag of an element contains Append child, Insert Before and Insert After submenus as first entries.