To change the order of categories in the Insert bar:
Save a backup copy of insertbar.xml (with a name such as insertbar.backup.xml).
1
Open the original insertbar.xml file.
2
Find the
3
category
including all the tags it contains.
Cut that tag.
4
Paste the tag into its new location. Be sure to paste the tag in a location that isn't inside any
5
other
category
Save the insertbar.xml file.
6
Reload extensions.
7
To create a new category:
Save a backup copy of insertbar.xml (with a name such as "insertbar.backup.xml").
1
Open the original insertbar.xml file.
2
Create a new category tag, specifying the default folder for the category and a set of objects to
3
appear in the category.
For information on the syntax of the tags in insertbar.xml, see
4
on page
115.
Save the insertbar.xml file.
5
Reload extensions.
6
Adding objects to the Insert bar
To add a new object to the Insert bar, define the specific string of code for the user's document
using HTML and, optionally, JavaScript. Then, identify or create a graphic (18 x 18 pixels) for
the button in the Dreamweaver interface. If you create a larger object image, Dreamweaver scales
it to 18 x 18 pixels. If you do not create an image for your object, a default object icon with a
question mark (?) appears on the Insert bar. Add the new files to the Configuration/Objects
folder. Finally, edit the insertbar.xml file to identify the location of these new files and set some
parameters (see
editing the inserbar.xml file, restart Dreamweaver, and the new object appears on the Insert bar in
the specified location.
Note: Although you can store Object files in separate folders, it's important that each filename be
unique. The dom.insertObject() function, for example, looks for files anywhere within the Objects
folder without regard to subfolders (for more information about the dom.insertObject() function,
see the
Dreamweaver API Reference). If a file called Button.htm exists in the Forms folder and another
object file called Button.htm is in the MyObjects folder, Dreamweaver cannot distinguish between
them. So, if two separate instances of Button.htm exist,
called Button, and the user might not recognize any difference.
Adding objects to the Insert menu
To add or control the position of an object on the Insert menu (or any other menu), modify the
menus.xml file. This file controls the entire menu structure for Dreamweaver. For more
information about modifying the menus.xml file, see
on page
145.
If you plan to distribute the extension to other Dreamweaver users, see
Extension Manager" on page 28
tag that corresponds to the category you want to move, and select that tag,
tag.
"The Insert bar definition file" on page
to learn more about packaging extensions.
"Insert bar definition tags"
114) for the button's appearance. After
displays two objects
dom.insertObject()
"Menus and Menu Commands"
"Working with the
The Insert bar definition file
121
Need help?
Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers