
119
EXTENDING DREAMWEAVER CS4
Insert bar objects
Create the image
1 Create a GIF file that is 18 x 18 pixels, which looks like the following figure:
2 Save the image as AddBlue.gif in the Editorial folder.
Next, you edit the insertbar.xml file. This file defines the objects on the Insert bar and their locations. Notice the
various
menubutton tags and their attributes within the category tags; these menubutton tags define each pop-up
menu in the HTML category. Within the
menubutton tags, each button tag defines an item in the pop-up menu.
Edit the insertbar.xml
1 Find the following line of code near the beginning of the file:
<insertbar xmlns:MMString="http://www.adobe.com/schemes/data/string/">
The insertbar tag defines the beginning of all the Insert bar contents.
2 After that line, add a new category tag for the Editorial category you want to create. Give it a unique ID, name,
and folder attributes, and add a closing
category tag, as shown in the following example:
<category id="DW_Insertbar_Editorial" name="Editorial" folder="Editorial">
</category>
3 Reload extensions. For information on reloading extensions, see “Reloading extensions” on page 78.
The Editorial category appears on the Insert bar:
4 Within the opening and closing category tags, add the pop-up menu by using the menubutton tag and the
following attributes, including a unique ID.
<menubutton id="DW_Insertbar_Markup" name="markup" image="Editorial\Strikethrough.gif"
folder="Editorial">
For more information about attributes, see “Insert bar definition tag attributes” on page 108.
5 Add the objects for the new pop-up menu using the button tag, as follows:
<button id="DW_Editorial_Strikethrough" image="Editorial\Strikethrough.gif"
file="Editorial\Strikethrough.htm"/>
6 After the Strikethrough object button tag, add the hypertext object, as follows:
Commenti su questo manuale