Macromedia dreamweaver 8-extending dreamweaver User Manual
A simple insert object example
157
Building an Insert bar pop-up menu
The Dreamweaver Insert bar introduces a new organization for objects and now supports
pop-up menus to help organize objects into smaller groups, as shown in the following figure.
pop-up menus to help organize objects into smaller groups, as shown in the following figure.
The following example builds a new category on the Insert bar called Editorial and then adds
a pop-up menu to that category. The pop-up menu contains the Strikethrough object you
already created and groups it with a Blue Text object you will create. The objects in the
Editorial category let users make editorial comments in a file and either strike through the
content they want to remove or make new content blue.
a pop-up menu to that category. The pop-up menu contains the Strikethrough object you
already created and groups it with a Blue Text object you will create. The objects in the
Editorial category let users make editorial comments in a file and either strike through the
content they want to remove or make new content blue.
To organize the files:
1.
Create a new Configuration/Objects/Editorial folder in your Dreamweaver installation
folder.
folder.
2.
Copy the files for the Strikethrough object example you created (Strikethrough.htm,
Strikethrough.js, and Strikethrough.gif) to the Editorial folder.
Strikethrough.js, and Strikethrough.gif) to the Editorial folder.
To create the Blue Text object:
1.
Create a new HTML file.
2.
Add the following code:
<html>
<head>
<title>Blue Text</title>
<script language="javascript">
<head>
<title>Blue Text</title>
<script language="javascript">
//--------------- API FUNCTIONS ---------------
function isDOMRequired() {
// Return false, indicating that this object is available in Code
view.
return false;
view.
return false;
}
function objectTag() {