A simple insert object example
153
To separate the HTML object definition file from the supporting JavaScript
functions:
1.
Create a new blank file.
2.
Paste all the JavaScript functions into the file.
3.
Remove the functions from Strikethrough.htm, and add the JavaScript filename to the
src
attribute of the script 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.
5.
Save the file that now contains the JavaScript functions as Strikethrough.js in the
Configuration/Objects/Text folder.
Creating the image
To create the image for the Insert bar:
1.
Create a GIF image (18 x 18 pixels), as shown in the following figure:
2.
Save the file as Strikethrough.gif in the Configuration/Objects/Text folder.
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.
The code within the insertbar.xml file identifies all the existing objects on the Insert bar
■
Each
category
tag in the XML file creates a category in the interface.
■
Each
menubutton
tag creates a pop-up menu on the Insert bar.
NO
TE
Before you edit the insertbar.xml file, you might want to copy the original one as
insertbar.xml.bak, so you have a backup.
Summary of Contents for DREAMWEAVER 8-EXTENDING DREAMWEAVER
Page 1: ...Extending Dreamweaver...
Page 8: ...8 Contents...
Page 14: ...14 Introduction...
Page 16: ......
Page 54: ...54 Customizing Dreamweaver...
Page 96: ...96 Customizing Code View...
Page 98: ......
Page 110: ...110 Extending Dreamweaver...
Page 138: ......
Page 166: ...166 Insert Bar Objects...
Page 180: ...180 Commands...
Page 248: ...248 Toolbars...
Page 260: ...260 Reports...
Page 278: ...278 Tag Libraries and Editors...
Page 288: ...288 Property Inspectors...
Page 378: ...378 Server Behaviors...
Page 398: ...398 Data Sources...
Page 432: ...432 Server Models...
Page 456: ...456 Data Translators...
Page 482: ......
Page 492: ...492 The Shared Folder...