User Guide
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