Dreamweaver 4 offers greater extensibility and customization than its predecessors and competitors. Beyond the preferences covered in the previous chapter, you can customize Dreamweaver’s menus, keyboard shortcuts, and Objects panel (downloadable extensions, described in Chapter 22, often modify these UI elements to give developers access to enhanced functionality).
Dreamweaver menus are defined in an XML-like syntax and stored in the Dreamweaver4/Configuration/Menus/menus.xml file. To customize the menus, exit Dreamweaver and modify the menus.xml file in a text editor, such as WordPad (Windows) or BBEdit (Macintosh).
Do not edit the menus.xml file in
an XML-savvy editor, as it is not a true XML file. It contains
that generate errors when the XML is parsed. Also, don’t edit
menus.xml in Dreamweaver. Don’t change the
id attributes within the file. If you
make a mistake, restore menus.xml
from the backup copy, menus.bak,
provided by Macromedia in the same folder.
menus.xml file defines menu bars, menus, and
menu items. Example 19-1 shows an excerpt of the code
that defines Dreamweaver’s Edit menu.
Example 19-1. An excerpt of the Edit menu definition
<menu name="_Edit" id="DWMenu_MainSite_Edit"> <menuitem name="Cu_t" key="Cmd+X" enabled="dw.canClipCut( )" command="dw.clipCut( )" id="DWMenu_MainSite_Edit_Cut" /> <menuitem name="_Copy" key="Cmd+C" enabled="dw.canClipCopy( )" command="dw.clipCopy( ...