490
Code
Code Coloring lets you specify code color styles and to modify existing code coloring schemes
or create new ones. You can specify code coloring styles and schemes by modifying the
Colors.xml and code coloring scheme files. For more information on these files, see
Extending
Dreamweaver.
The JavaScript API for Code Hints and Code Coloring consists of the following functions.
dreamweaver.codeHints.addMenu()
Availability
Dreamweaver MX.
Description
Dynamically defines a new
menu
tag in the CodeHints.xml file. If there is an existing menu
tag that has the same pattern and document type, this function adds items to the existing
menu.
Arguments
menuGroupId, pattern, labelArray, {valueArray}, {iconArray}, {doctypes},
{casesensitive}
■
The
menuGroupId
argument is the ID attribute for one of the
menugroup
tags.
■
The
pattern
argument is the pattern attribute for the new
menu
tag.
■
The
labelArray
argument is an array of strings. Each string is the text for a single menu
item in the pop-up menu.
■
The
valueArray
argument, which is optional, is an array of strings, which should be the
same length as the
labelArray
argument. When a user selects an item from the pop-up
menu, the string in this array is inserted in the user’s document. If the string to be inserted
is always the same as the menu label, this argument might have a
null
value.
■
The
iconArray
argument, which is optional, is either a string or an array of strings. If it is
a string, it specifies the URL for a single image file that Dreamweaver uses for all items in
the menu. If it is an array of strings, it must be the same length as the
labelArray
argument. Each string is a URL, relative to the Dreamweaver Configuration folder, for an
image file that Dreamweaver uses as an icon for the corresponding menu item. If this
argument is a
null
value, Dreamweaver displays the menu without icons.
■
The
doctypes
argument, which is optional, specifies that this menu is active for only
certain document types. You can specify the
doctypes
argument as a comma-separated
list of document type IDs. For a list of Dreamweaver document types, see the
Dreamweaver Configuration/Documenttypes/MMDocumentTypes.xml file.
000_DW_API_Print.book Page 490 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...