Editing attributes
You can edit attributes in two ways:
- Using the Attributes
tool.
- Directly in the structure view.
Editing attributes through the Attributes tool
The Attributes tool can be used to create an attribute,
change the value of an existing attribute, or delete an attribute. It
displays:
- The list of attributes already applied to the first selected element
and their current value. Mandatory attributes are displayed in red and
cannot be removed.
- Below, a combo box labelled Insert provides the list
of all attributes that may be applied to the first selected element.
To add an attribute to an element:
- Click within the element and press the
F2
key
to select the element of interest.
- When the element is selected, choose in the Insert
combo box the attribute you want to add. This attribute is now
activated.
- For boolean attributes (such as
ismap
for an image), the
command is finished.
- For attributes with a limited set of predefined values (such as
lang
), you have to select a value in the list of possible
values.
- For other attributes you have to edit the value, then confirm either
with the Enter key or with the apply button ().
To change the value of an attribute:
- Click within the element and press the
F2
key
to select the element of interest.
- When the element is selected, click on the name of the attribute you
want to modify, to display the editing form of its value.
- For attributes with a limited set of predefined values (such as
lang
), Amaya displays:
- A combo box giving the list of possible values.
- A button () to remove the
attribute.
- For attributes with a free value (such as
href
for an
anchor), Amaya displays:
- An input box to insert the value.
- An apply button () to confirm the inserted
value. The Enter key can also be used to confirm the
value.
- A button () to remove the
attribute.
To remove an attribute from an element:
- Click within the element and press the
F2
key
to select the element of interest.
- When the element is selected, click on the name of the attribute, to
display the editing form of its value.
- Click on the delete button () to remove the
attribute.
Editing attributes in the structure view
All attributes are displayed in the structure view. Attribute values may
be displayed in blue or purple. When the value is displayed in blue, you can
only change it with the Attributes tool. This ensures that
only one of the predefined values is chosen.
Attributes with a free value can be edited in the structure view.
- You can click within the attribute value (displayed in purple) and edit
the value like any other character string.
- To select the whole value, you can click within the value then hit the
F2
key.
- To remove the attribute, you can select the whole value, then press the
Delete
key twice. The first
Delete
removes the attribute value and the second
removes the attribute itself.
Copying attributes
An attribute is not the same thing as an element, and an attribute can not
be copied by the Copy/Paste entries on the
Edit menu. Only a textual attribute value can be
copied/pasted.