Structure your content
Organize your content inside the Content Editor with XML elements.
Introduction
Inside the Content editor, you see your content and the elements that organize your content. For example, headlines, paragraphs, lists, or tables. The elements are the container for your content. In the elements, you can enter your content. You cannot enter content outside of elements.
Your document has a predefined XML structure that specifies which content elements the document contains and in which position and order the content elements can be placed. The Content editor assists you in selecting the allowed elements. Based on the position of the cursor in the content structure, the Content editor displays appropriate elements for insertion. When you insert an element that is not allowed at a position or is incomplete, this is indicated to you.
Elements are always visible. You can change how the elements display in the Content editor.
Insert elements
Based on the position of your cursor in the content structure, the Content editor shows appropriate elements when you want to insert new elements.
For Example: A List element consists of List item elements. When the cursor is placed inside a list, a limited number of elements is available for selection. You can only add more list items, a subordinate list or a paragraph. You cannot add a table, headline or interactive box within the list.
Insert elements
Select the element after which you want to insert a new element. It displays in blue.
In the toolbar, click Add element . A list of the available elements is displayed. Select the element you want to add. The element is inserted after the element that you selected in step 1.
You can immediately add content inside the element that you inserted. For example, start typing text.
Reinsert the same element
Select the element you want to reinsert.
Press RETURN.
The element is duplicated and displayed below the selected element. The content of the element is not duplicated.
Tip: This method is useful when you create elements that contain elements that repeat such as in lists or tables. For example: Add a list with one list item. Then press RETURN several times to add as many list items as you need. Only then add your content inside the list items.
Tip: If the element already contains text content, you can reinsert the element before or after the selected element. To reinsert an element before the selected element, click inside the element at the first character of the text. To reinsert an element after the selected element, click inside the element at the last character of the text. Then press RETURN.
Insert elements after nested elements
Elements such as lists or tables consist of a hierarchy of nested elements. For example, a table consists of column and row elements that include paragraph elements.
If your cursor is positioned inside a nested element structure, you must quit the selected structure before you can add any elements outside of it.
Select the top-level element after which you want to insert a new element. For example, to add a paragraph after a list, select the top-level List element. Do not select a single List item element. Ensure that the entire list element is marked in blue.
In the toolbar, click Add element . A list of the available elements is displayed. Select the element that you want to add. The element is inserted and displayed after the selected top-level element.
Change elements
For several text elements, you can change an existing element into another element type. For example, you can change between headline elements and a paragraph.
Select the element that you want to change.
In the toolbar, select an element to which you want to change from the Elements drop-down list.
The element type changes. The content of the element remains the same.
Delete elements
To delete elements:
Select the element. For nested elements, ensure that you select the entire element. For example, to delete a list item, select the whole List item element. Do not only select the paragraph within the List item element. To delete an entire list, select the top-level List element. Do not only the single List items in the list. Otherwise, the XML structure is invalid.
In the toolbar, click Delete .
The element is removed from the Content editor.
Change elements view
Elements are always visible in the Content editor. Several element views are available. Each view presents elements in different ways.
Pretty view and Pretty view V2
The Pretty view hides the actual XML structure and displays the content in a WYSIWYG style. This supports intuitive editing and helps you to get a better overview of the content of your article. Elements display in a simplified way above the content (Pretty view) or in a column next to the content (Pretty view V2).
Tree view
The Tree view shows the actual XML structure. This view is useful when you edit complex nested structures and need to know the exact context of your cursor position. The Tree view helps you to insert elements at the correct position inside an element hierarchy. For example, in complex tables with merged cells.
XML view
The XML view displays the content in XML. This is an expert view that you can use to analyze the XML of your article. This view is for display only. The XML view needs to be enabled in the widget configuration. The XML view can be deactivated by your administrator.
To change the elements views:
In the Content editor widget, click the Options menu and select the view you want.
To enable the XML view:
In the Content editor widget, click the Options menu icon and select Configure widget.
Slide Allow raw XML view to ON. The XML view is added to the Options menu for selection.
Validate XML structure
Valid structure
The Content editor checks the validity of the XML structure of your article as you work. The Content editor assists you in inserting elements that are valid at a certain position in the document. The validity status is shown in the toolbar.
The structure is valid:
Invalid structure
Sometimes, the structure of your article is broken. For example, you only deleted the sub-element of a nested element. The current validity status is shown in the toolbar.
The structure is invalid:
Correct invalid structure
Use the arrow icons next to the invalidity warning to jump to the invalid structure in the document.
Click the invalid element. Click the red notification next to it. The notification icon shows which element is missing or incorrect.
Based on the notification, change or insert the necessary element. The red notification is removed. The element is valid again.
Result
You know how to organize your content with elements. You know show to see if your article is valid.