How Commands Work - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Chapter 9: Commands
Adobe Dreamweaver CS3 commands can perform almost any kind of edit to a user's current
document, other open documents, or any HTML document on a local drive. Commands can
insert, remove, or rearrange HTML tags and attributes, comments, and text.
Commands are HTML files. The body section of a command 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 command file contains JavaScript functions that process form
input from the body section and control what edits are made to the user's document.
The following table lists the files you use to create a command:
Path
Configuration/Commands/
Configuration/Commands/

How commands work

When a user clicks a menu that contains a command, the following events occur:
Dreamweaver calls the
1
item should be disabled. If the
command is dimmed in the menu, and the procedure stops. If the
function returns a
value, the procedure can continue.
true
The user selects a command from the menu.
2
Dreamweaver calls the
3
file to let the command process any arguments that pass from the menu item or from the
dreamweaver.runCommand()
dreamweaver.runCommand()
File
Description
commandname.htm
Specifies the user interface.
commandname.js
Contains the functions to execute.
function to determine whether the menu
canAcceptCommand()
canAcceptCommand()
function, if defined, in the selected command
receiveArguments()
function. For more information on the
function, see the Dreamweaver API Reference.
function returns a
value, the
false
canAcceptCommand()

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents