User Guide

Code coloring 85
Notice that the syntaxColor and tagColor tags in the Colors.xml file assign color and style
values to an
id string value. The id value is then used in the codeColoring.xml file to assign a
style to a scheme tag. For example, the
defaultTag tag in the codeColoring.xml excerpt has an
id of "CodeColor_HTMLComment". In the Colors.xml file, the id value of
"
CodeColor_HTMLComment" is assigned a text= value of "#999999", which is gray.
Dreamweaver includes the following code coloring schemes: Default, HTML, JavaScript,
ASP_JavaScript, ASP_VBScript, JSP, and ColdFusion. The Default scheme has an
id value equal
to
"Text". Dreamweaver uses the Default scheme for document types that do not have a defined
code coloring scheme.
A code coloring file contains the following tags.
<scheme>
Description
The scheme tag specifies code coloring for a block of code text. You can have multiple schemes
within a file to specify different coloring for different scripting or tag languages. Each scheme has
a priority that lets you nest a block of text with one scheme inside a block of text with a
different scheme.
Attributes
name
, id, priority, doctypes
name="scheme_name" A string that assigns a name to the scheme. Dreamweaver shows the
scheme name in the Edit Coloring Scheme dialog box. Dreamweaver shows a combination of
scheme name and field name, such as
HTML Comment. If you do not specify a name, the fields
for the scheme do not appear in the Edit Coloring Scheme dialog box. For more information
about the Edit Coloring Scheme dialog box, see “Editing schemes” on page 103.
id="id_string" Required. An identifier string that maps color and style to this syntax item.
priority="string" The value ranges from "1" to "99". Highest priority is "1". Specifies
the precedence of the scheme. Blocks that are inside blocks with higher priority are ignored;
blocks that are inside blocks with the same or lower priority take precedence. The priority
defaults to "50" if you do not specify one.
doctypes="doc_list" Optional. Specifies a comma-separated list of the document types to
which this code coloring scheme applies. This value is necessary to resolve conflicts in which
different start and end blocks use the same extensions.
Contents
blockEnd
, blockStart, brackets, charStart, charEnd, charEsc, commentStart,
commentEnd, cssProperty, cssSelector, cssValue, defaultAttribute, defaultText,
endOfLineComment, entity, functionKeyword, idChar1, idCharrest, ignoreCase,
ignoreMMTParam, ignoreTags, keywords, numbers, operators, regexp, sampletext,
searchPattern, stringStart, stringEnd, stringEsc, urlProtocol, urlProtocols
Container
The codeColoring tag.
Example
<scheme name="Text" id="Text" doctypes="Text" priority="1">