Testing the extension
After you place the files in the Commands folder, you can test the extension.
To test the extension:
1.
Restart Dreamweaver or reload extensions. For information on reloading extensions, see
"Reloading extensions" on page
The Change Case entry should now appear on the Commands menu.
2.
Type some text in a document.
3.
Select the text.
Change Case is dimmed until the user selects text in the document.
4.
Select Change Case from the Commands menu.
The text changes case.
The Commands API
The custom functions in the Commands API are not required.
canAcceptCommand()
Description
This function determines whether the command is appropriate for the current selection.
Do not define canAcceptCommand() unless it returns a value of false in at least one
case. If the function is not defined, the command is assumed to be appropriate. Making
this assumption saves time and improves performance.
Arguments
None.
Returns
Dreamweaver expects a
Dreamweaver dims the command in the menu.
176
Commands
104.
value if the command is allowed; if the value is
true
,
false
Need help?
Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?