Adobe Extending Dreamweaver CS4 Manual de usuario Pagina 124

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 387
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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.
Vista de pagina 123
1 2 ... 119 120 121 122 123 124 125 126 127 128 129 ... 386 387

Comentarios a estos manuales

Sin comentarios