Menu commands

Menu commands make menus more flexible and dynamic. As with regular commands, menu commands can perform almost any kind of edit to the current document, other open documents, or any HTML document on a local drive. The Menu Commands API expands the regular Commands API to accomplish several tasks that are related to displaying and calling the command from the menu system.

Menu commands are HTML files that are referenced in the file attribute of a menuitem tag in the menus.xml file. The BODY section of a Menu Commands file can contain an HTML form that accepts options for the command (for example, how a table should be sorted and by which column). The HEAD section of a Menu Commands file contains JavaScript functions that process form input from the BODY section and control the edits to the user's document.

Menu commands are stored in the Configuration/Menus folder inside the Adobe Dreamweaver application folder.

The following table lists the files you use to create a Menu command.

Path

File

Description

Configuration/Menus/

menus.xml

Contains a structured list of menu bars, menus, menu commands, separators, shortcut lists, and keyboard shortcuts. Modify this file to add new menus and menu commands.

Configuration/Menus/

commandname.htm

Contains the functions required by the menu command.

NOTE

If you add custom menu commands to Adobe Dreamweaver, add them at the top level of the Menus folder or create a subfolder. The Adobe folder MM is reserved for the menu commands that come with Adobe Dreamweaver.