One of the most useful features in Author mode is the content completion support. The fastest way to invoke it is to press Enter or Ctrl Space (Command Space on OS X) in the editor panel.
The content completion window offers the following types of actions:
Figure: Content Completion Window
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 cursor 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 cursor position. Thus, if the cursor is positioned at the beginning or at the end of the element, the newly created sibling will be empty.
If the cursor is positioned inside a space preserved 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.
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 by highlighting the appropriate block of content and
use the
Remove All
Markup action that is available in the Refactoring
submenu of the contextual menu and in the menu.
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 a marker representing the start or end tag of an element, the entire element is selected and numerous context specific actions are available in the various menus and the contextual menu.