Adobe 38040334 - Dreamweaver CS3 User Manual page 113

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

To create a new category:
1
Save a backup copy of insertbar.xml (with a name such as "insertbar.backup.xml").
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 appear in the
3
category.
For information on the syntax of the tags in insertbar.xml, see "Insert bar definition tags" on page 101.
4
Save the insertbar.xml file.
5
6
Reload extensions.
Adding objects to the Insert bar
You can add objects to the Insert bar. To make the changes appear in the Insert bar, you must either restart Dream-
weaver or reload extensions. For information on reloading extensions, see "Reloading extensions" on page 74.
To add a new object to the Insert bar, do the following:
Define the specific string of code for the user's document by using HTML and, optionally, JavaScript.
1
Identify or create an image (18 x 18 pixels) for the button in the Dreamweaver interface.
2
If you create a larger 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.
3
4
Edit the insertbar.xml file to identify the location of these new files and set attributes (see "The Insert bar
definition file" on page 100) for the button's appearance.
5
Restart Dreamweaver or reload extensions.
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
function, for example, looks for files anywhere within the Objects folder without regard to
dom.insertObject()
subfolders (for more information about the
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. If two separate instances of Button.htm exist,
displays two objects 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 "Menus and menu commands" on page 136.
If you plan to distribute the extension to other Dreamweaver users, see "Working with the Extension Manager" on
page 77 to learn more about packaging extensions.
function, see the Dreamweaver API Reference). If a
dom.insertObject()
DREAMWEAVER CS3
Extending Dreamweaver
dom.insertObject()
107

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents