
6. Creating elements
6.1. Editing modes
Amaya offers two editing modes:
• The XML mode is very efficient for manipulating different types of XML structures, but it
requires from the user a good knowledge of the document structure. The simple manipulations
performed through a few keystrokes in the XML mode are generic: they can be performed for
any type of element from any XML vocabulary, whatever their semantics. It works well with
HTML text, but also with MathML equations or SVG drawings.
• The Text mode allows users to handle HTML elements in the same way as in a word processor.
That mode does not apply to other XML vocabularies.
You can easily switch editing mode (Text/XML) by clicking on the corresponding button in the bottom
right corner of the window.
6.2. Buttons and menus
Entries of the Insert menu, and the corresponding buttons in the Elements tool, let you create new
elements within a document. To use these commands, place the insertion point at the desired position and
choose the element type.
The Elements tool allows you to immediately
• insert (or replace the current selection by) an XHTML element among the following: division (
), headings ( , , ), paragraph (P), table ( ), target anchor or target element ( ),
link anchor ( ), bulleted list ( ), numbered list ( ), definition list ( ), definition term (
), definition ( ), image ( ), object ( ).
• open/close (or enclose the current selection by) a an XHTML inline element: emphasis ( ),
strong ( ) code ( ), insertion ( ), deletion ( ),
superscript
( ), and
subscript
( ).
Note: With the Lite profile, only a subset of these buttons and menu entries are available.
For more information about these elements see the list of all HTML 4.0 elements.
6.3. Insertion point
When creating new elements, it is important to select an insertion point, not some text nor a single
character: if the current selection is not empty, Amaya tries to transform the selected part into the
element type chosen.
Sometimes elements can not be created at the chosen location because of the constraints imposed by the
HTML language. Amaya then tries to create the element at the closest valid position in the document
structure. For example, if the insertion point is within a paragraph,at the end of the last line, when you
click on the heading button , Amaya creates the new heading after the paragraph, not within it.
In some other cases, Amaya changes the existing structure for creating the desired element at a valid
position. If the insertion point is somewhere within a list item (li) when you create a heading button ,
the item and its enclosing list are automatically split, in order to create the requested heading at the
chosen position and to comply with HTML contraints.
6. Creating elements
15
Komentáře k této Příručce