
55
2
CHAPTER 2
Customizing Code View
Macromedia Dreamweaver 8 uses two devices in Code view that help you enter code quickly
and make your code readable and accurate. These two devices are code hints and code
coloring. In addition, Dreamweaver validates your code for the target browsers that you
specify and allows you to change default HTML formatting.
You can customize code hints and code coloring by modifying the XML files that implement
them. You can add items to the Code Hints menus by adding entries to the CodeHints.xml
file. You can modify color schemes by modifying the code coloring style file, Colors.xml, or
you can change code coloring schemes or add new ones by modifying one of the code coloring
syntax files, such as CodeColoring.xml. You can also modify the cascading style sheet (CSS)
profile file for your target browser to affect how Dreamweaver validates CSS properties and
values. You can also change Dreamweaver’s default HTML formatting through the
Preferences dialog box. The following sections describe how to customize these features.
Code hints
Code hints are menus that Dreamweaver opens when you type certain character patterns in
the Code view. Code hints offer a typing shortcut by providing a list of strings that potentially
complete the string you are typing. If the string you are typing appears in the menu, you can
scroll to it and press Enter or Return to complete your entry. For example, when you type
<, a
pop-up menu shows a list of tag names. Instead of typing the rest of the tag name, you can
select the tag from the menu to include it in your text.
Dreamweaver loads Code Hints menus from the CodeHints.xml file in the Configuration/
CodeHints folder. You can add Code Hints menus to Dreamweaver by defining them in the
CodeHints.xml file. After Dreamweaver loads the contents of CodeHints.xml, you can also
add new Code Hints menus dynamically through JavaScript. For example, JavaScript code
populates the list of session variables in the Bindings panel. You can use the same code to add
a Code Hints menu, so when a user types
"Session." in Code view, Dreamweaver displays a
menu of session variables. For information on using JavaScript to add or modify a Code Hints
menu, see Code Functions in the Dreamweaver API Reference.
Komentarze do niniejszej Instrukcji