Editing the XML content

By default you can type only in elements which accept text content. So if the element is declared as empty or element only in the associated schema you will not be allowed to insert text in it. This is also available if you ty to insert CDATA inside an element. Instead a warning message will be shown:

 

Figure 5.21. Editing in empty element warning

Editing in empty element warning

You can disable this behavior by checking the Allow Text in empty or element only content checkbox in the Author preferences page.

Entire sections or chunks of data can be moved or copied by using the Drag and Drop support. The following situations can be encountered:

The font size of the current WYSIWYG-like editor can be increased and decreased on the fly with the same actions as in the Text editor:

Ctrl-NumPad+ or Ctrl-+ or Ctrl-mouse wheel

increase font size

Ctrl-NumPad- or Ctrl-- or Ctrl-mouse wheel

decrease font size

Ctrl-NumPad0 or Ctrl-0

restore font size to the size specified in Preferences

Removing the text content of the current element You can remove the text content of the current element and keep only the markup with the action Remove Text available on the submenu Refactoring of the contextual menu and on the toolbar XML Refactoring. This is useful when the markup of an element must be preserved, for example a table structure but the text content must be replaced.