MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual page 128

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

</script>
</head>
<body>
</body>
</html>
Save this file to the Configuration/Objects/Text folder as Strikethrough.htm, and create a graphic
(GIF format, 18 x 18 pixels) for use on the Insert bar, as shown in the following figure:
Name the graphic file Strikethrough.gif, and save it in the Configuration/Objects/Text folder.
Now your HTML file identifies the code to insert into the document, and you have the
accompanying graphic file for the Insert bar. You need to edit the insertbar.xml file so
Dreamweaver can associate these two items with the Insert bar interface.
Note: Before you edit the insertbar.xml file, you might want to copy the original one as
insertbar.xml.bak, so you have a backup.
The code within the insertbar.xml file identifies all the existing objects on the Insert bar. Each
tag in the XML file creates a category in the interface. Each
category
pop-up menu on the Insert bar. And, each
Insert bar and connects it to the proper HTML file or function.
To add the new object to the Insert bar, find the following line near the beginning of the
inserbar.xml file:
<category id="DW_Insertbar_Common" MMString:name="insertbar/category/common"
folder="Common">
This line identifies the beginning of the Common category on the Insert bar. Start a new line after
the category tag, and insert the
Strikethrough object. The
conventions; use
simply tell Dreamweaver the location of the supporting files, as shown in the following example:
<button id="DW_Text_Strikethrough"
image="Text\Strikethrough.gif"
file="Text\Strikethrough.htm"/>
Save the insertbar.xml file, reload the extensions (see
new object appears at the beginning of the Common category on the Insert bar, as shown in the
following figure:
Creating a separate JavaScript file
In
"A simple Insert Object example" on page
containing both the HTML for the object and the JavaScript supporting the implementation of
the object. However, you can separate the JavaScript functions from the HTML object definition
file. This separate organization is very useful for objects containing several functions, or functions
that might be shared by other objects.
128
Chapter 6: Insert Bar Objects
button
must be a unique name for the button (following standard naming
id
DW_Text_Strikethrough
tag in the XML file places an icon on the
button
tag and assign it the
id
for this object). The
"To reload extensions" on page
126, you create a single object HTML file
menubutton
,
, and
attributes for the
image
file
and
attributes
image
file
tag creates a
120), and the

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents