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.
Содержание DREAMWEAVER 8-EXTENDING DREAMWEAVER
Страница 1: ...Extending Dreamweaver...
Страница 8: ...8 Contents...
Страница 14: ...14 Introduction...
Страница 16: ......
Страница 54: ...54 Customizing Dreamweaver...
Страница 96: ...96 Customizing Code View...
Страница 98: ......
Страница 110: ...110 Extending Dreamweaver...
Страница 138: ......
Страница 166: ...166 Insert Bar Objects...
Страница 180: ...180 Commands...
Страница 248: ...248 Toolbars...
Страница 260: ...260 Reports...
Страница 278: ...278 Tag Libraries and Editors...
Страница 288: ...288 Property Inspectors...
Страница 378: ...378 Server Behaviors...
Страница 398: ...398 Data Sources...
Страница 432: ...432 Server Models...
Страница 456: ...456 Data Translators...
Страница 482: ......
Страница 492: ...492 The Shared Folder...