Adobe Extending Dreamweaver CS4 Manuel d'utilisateur Page 124

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 387
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 123
118
EXTENDING DREAMWEAVER CS4
Insert bar objects
Strike through the content they want to remove or make new content blue
Organize the files
1 Create a new Configuration/Objects/Editorial folder in your Dreamweaver installation folder.
2 Copy the files for the Strikethrough object example you created (Strikethrough.htm, Strikethrough.js, and
Strikethrough.gif) to the Editorial folder.
Create the Blue Text object
1 Create an HTML file.
2 Add the following code:
<html>
<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;
}
function objectTag() {
// 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.
Vue de la page 123
1 2 ... 119 120 121 122 123 124 125 126 127 128 129 ... 386 387

Commentaires sur ces manuels

Pas de commentaire