Adobe 38040334 - Dreamweaver CS3 User Manual page 116

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

Advertisement

To separate the HTML object definition file from the supporting JavaScript functions:
1
Create a new blank file.
Paste all the JavaScript functions into the file.
2
Remove the functions from Strikethrough.htm, and add the JavaScript filename to the
3
tag, as shown in the following example:
<html>
<head>
<title>Strikethrough</title>
<script language="javascript" src="Strikethrough.js">
</script>
</head>
<body>
</body>
</html>
4
Save the Strikethrough.htm file.
Save the file that now contains the JavaScript functions as Strikethrough.js in the Configuration/Objects/Text
5
folder.
Creating the image
To create the image for the Insert bar:
Create a GIF image (18 x 18 pixels), as shown in the following figure:
1
Save the file as Strikethrough.gif in the Configuration/Objects/Text folder.
2
Editing the insertbar.xml file
Next, 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.
category
• Each
tag creates a pop-up menu on the Insert bar.
menubutton
• Each
tag in the XML file places an icon on the Insert bar and connects it to the proper HTML file or
button
function.
To add the new object to the Insert bar:
Find the following line near the beginning of the inserbar.xml file:
1
_
<category id="DW
Insertbar
folder="Common">
_
Common" MMString:name="insertbar/category/common"
DREAMWEAVER CS3
Extending Dreamweaver
attribute of the script
src
110

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents