
158 Insert Bar Objects
// 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
menubutton tags and their attributes within the category tags;
these
menubutton tags define each pop-up menu in the HTML category. Within the
menubutton tags, each button tag defines an item in the pop-up menu.
Kommentare zu diesen Handbüchern