Code Coloring - MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Table of Contents

Advertisement

Code coloring

Dreamweaver lets you customize or extend the code coloring schemes that you see in Code
view so that you can add new keywords to a scheme or add code coloring schemes for new
document types. If you develop JavaScript functions to use in your client-side script, for
example, you can add the names of these functions to the keywords section so that they
display in the color that is specified in Preferences. Likewise, if you develop a new
programming language for an application server and you want to distribute a new document
type to help Dreamweaver users build pages with it, you could add a code coloring scheme for
the document type.
Dreamweaver provides the JavaScript function
which enables you to reload code coloring XML files that might have been edited manually.
For more information on this function, see the Dreamweaver API Reference.
To update a code coloring scheme or add a new scheme, you must modify the code coloring
definition files.
Code coloring files
Dreamweaver defines code coloring styles and schemes in XML files that reside in the
Configuration/CodeColoring folder. A code coloring style file defines styles for fields that are
defined in syntax definitions. It has a root node of
file defines code coloring syntax and has a root node of
The code coloring style file that Dreamweaver provides is Colors.xml. The code coloring
syntax files that Dreamweaver provides are CodeColoring.xml, ASP JavaScript.xml, ASP
VBScript.xml, ASP.NET CSharp.xml, and ASP.NET VB.xml.
The code coloring in the following examples does not appear on a black and white
printed page. To see the code coloring in these examples, see Dreamweaver Help >
Extensions > Extending Dreamweaver or see the PDF file for Extending Dreamweaver in
the Documentation folder on your installation CD.
The following excerpt from the Colors.xml file illustrates the hierarchy of tags in a code
coloring style file:
<codeColors>
<colorGroup>
<syntaxColor
<syntaxColor
<syntaxColor
...
<tagColor
id="CodeColor_HTMLStyle" text="#990099"
id="CodeColor_HTMLEntity" bold="true" italic="true"
id="CodeColor_JavascriptNative" text="#009999"
id="CodeColor_JavascriptNumber" text="#FF0000"
dreamweaver.reloadCodeColoring()
. A code coloring scheme
<codeColors>
<codeColoring>
,
.
/>
/>
/>
/>
Code coloring
63

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