MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual page 158

Extending dreamweaver
Table of Contents

Advertisement

// Manually wrap tags around selection.
var dom = dw.getDocumentDOM();
if (dw.getFocus() == 'textView' || dw.getFocus(true) == 'html'){
var upCaseTag = (dw.getPreferenceString("Source Format", "Tags Upper
Case", "") == 'TRUE');
// Manually wrap tags around selection.
if (upCaseTag){
dom.source.wrapSelection('<FONT COLOR="#0000FF">','</FONT>');
}else{
dom.source.wrapSelection('<font color="#0000FF">','</font>');
}
}else if (dw.getFocus() == 'document'){
dom.applyFontMarkup("color", "#0000FF");
}
// Just return -- don't do anything else.
return;
}
</script>
</head>
<body>
</body>
</html>
3.
Save the file as AddBlue.htm in the Editorial folder.
Now you can create an image for the Blue Text Object.
To create the image:
1.
Create a GIF file that is 18 x 18 pixels, which will look like the following figure:
2.
Save the image as AddBlue.gif in the Editorial folder.
Next, you edit the insertbar.xml file. This file defines the objects on the Insert bar and their
locations. Notice the various
these
tags define each pop-up menu in the HTML category. Within the
menubutton
tags, each
menubutton
158
Insert Bar Objects
tags and their attributes within the
menubutton
tag defines an item in the pop-up menu.
button
tags;
category

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver 8

Table of Contents