The Dreamweaver JavaScript API > Command functions > dreamweaver.runCommand() |
Availability
Dreamweaver 3.0
Description
Executes the specified command. To the user, the effect is the same as choosing the command from a menu; if a dialog box is associated with the command, it appears (and the command script blocks other edits until the user dismisses the dialog box). This function provides the ability to call a command from another extension file.
Note: This function can be called only within the objectTag() function or in any script in a command, Property Inspector file, or menu.
Arguments
commandFile, {commandArg1}, {commandArg2},...{commandArgN}
commandFile is the name of a file in the Configuration/Commands folder. |
|
The second and remaining arguments are passed to commandFile as arguments. |
Returns
Nothing.
Enabler
None.
Example
You can write a custom Property inspector for tables that lets users get to the Format Table command from a button on the inspector by calling the following function from the button's onClick event handler:
function callFormatTable(){
dw.runCommand('Format Table.htm');
}