4.2. Inserting elements

The insert tab of the element manager on the left side of the screen displays the elements that can be inserted at the location of the insertion cursor.

Follow these steps to insert a new element into your document:

  1. Place the insertion cursor at the appropriate location in your document. The element manager will display the elements that can be inserted at this location.

  2. Select the desired element from the insert tab of the element manager.

  3. Press the Return key or click on the insert button in the element manger to insert the new element.

After performing these steps, a new element is inserted at the current location of the insertion cursor. The start and end tags of the new element are displayed to the left and the right of the insertion cursor.

Depending on the style sheet settings for the inserted element, epcEdit can automatically create the elements that must occur inside the new element according to the definition of this element in the DTD.

After inserting a new element, the element manager will remain active if the new element can only contain other elements, but no data. The element manager will become inactive and the insertion cursor will be redisplayed in the document window if the new element can contain character data.

Note: You can switch to the Insert tab of the element manager by pressing Ctrl-i. Pressing Ctrl-i again will switch back to the document window.

If you want to enclose existing text (and markup) in a new element, you can select a region of the document before inserting a new element. If a new element is inserted while a region of the document is selected, this region will become the content of the new element.

Enclosing existing text in a new element will only work if any markup in the selected region is properly balanced and the content of the selected region is compatible with the content model of the new element (as defined by the DTD).