To edit the text of a document, you place the insertion cursor at the desired location in your document. You may then insert characters by typing or delete characters by pressing the Delete or Backspace keys.
The DTD of your document defines whether an element can contain textual data. If you try to insert text into an element that does not allow text to occur or outside of the document element, epcEdit will refuse to insert the text and display an error message in the status bar.
You can select a portion of the text with the mouse by holding down the left mouse button while moving the mouse to the end of the region that is to be selected. If you select text with the mouse and the mouse cursor passes over the start or end tag of an element, the selection is extended to cover the complete element. Alternatively, you can double click on the start tag or end tag of an element to select the complete element.
You can select a region of text (independently of the document structure) with the arrow keys by holding down the Shift key.
If you press a character key while text is selected, the selected text is removed and replaced by the character that you have entered. If you click a mouse button outside of the selected region or press an arrow key without holding the Shift key, the selected region becomes unselected.
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.

Example 2-1. Inserting a new paragraph
Position the cursor after the end tag of the para element.

Click on the para entry in the insert tab of the element manager.
Press the Return key or click on the insert button in the element manager.
The start and end tags for a new para element will be inserted in the example document around the insertion cursor.

You can now enter the content of your new paragraph. Any text that you type and any markup that you add will become part of the new element (as long as the insertion location remains inside this element).
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.
Example 2-2. Enclosing text in a new element
Select a region of text (e.g. the word 'paragraph') in the document. Make sure that you do not include an unbalanced markup icon when selecting with the keyboard.
Click on the title of the Insert tab in the element manager to bring the list of insertable elements to the front.
Click on the em element in the element list.
Press the Return key or click on the button in the element manager.
A new em element will be inserted around the selected region. The content of the selected region will become the initial 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).
Some elements carry additional information in the form of attribute values. The Attributes tab of the element manager shows the current attribute values of the element that contains the insertion cursor.
Attribute values can be modified by editing the appropriate field in the Attributes tab of the element manager. If an attribute is restricted to a set of possible values, these values are shown as a drop-down list in the Attributes tab of the element manager. If an attribute value may be freely entered, an entry field is made available for entering the value.
To edit the attribute values of an element, follow these steps:
Example 2-3. Editing an attribute value
Place the insertion cursor inside the em element that you have just inserted.
Click on the title of the Attributes tab in the element manager. The list of attributes and attribute values of the current element is displayed. The em element has only one attribute, so there is only one entry in this list.
Click on the type attribute in the element manager. A drop-down list for the attribute value appears.
Select the appropriate value (e.g. bf) from the drop-down list and press the Return key to accept the new attribute value.
The new attribute value will be displayed in the start tag of the em element.
You can turn the display of attribute values in the element tags on or off by selecting -> from the main menu.
There is a difference between deleting an attribute value and setting the value of an attribute to an empty string. In the first case, the element still has the attribute, but the value of the attribute is empty. In the second case, the attribute is undefined for the element in question.
Some entity references can be inserted automatically into your document. For example, if you press the < key, epcEdit will normally insert a reference to the lt entity so that < will appear in your document text. Because the lt entity is usually displayed as '<', you will not see that epcEdit has inserted an entity reference instead of a single character. To see which entity references actually occur in your document, you can modify the entity display status by selecting -> from the main menu.
Example 2-4. Inserting an entity reference (by typing)
Position the insertion cursor somewhere in a title or para element.
Press the < key. The character '<' will appear in your document.
To see the which entity reference has been inserted, select -> from the main menu. epcEdit will display < instead of the '<' character.
To turn the display of entity names off, select -> again.
Some entity references are not inserted automatically. To insert an entity that is not bound to a key, select -> from the main menu to display a list of entities that can be inserted.
The element that contains the insertion cursor can be deleted from your document by pressing the button in the button bar or by selecting from the menu.
If you delete an element with the button or with the menu item, the element and its content are deleted.
Example 2-5. Deleting an element
Place the insertion cursor inside the second paragraph element in the example document. This is the element that we have inserted in Inserting a new element.
You may want to type some arbitrary text to see what happens to the content of the deleted element.
Select from the menu.
The paragraph element is deleted from the document.
Note that you can not delete the document element, i.e. the element that encloses the whole document.