Customizing Dreamweaver > Extending Dreamweaver: Basics |
Dreamweaver is designed to be extensible. It includes a JavaScript interpreter, so it can read and execute JavaScript code; and it provides an application programming interface (API), a large set of JavaScript functions that allow developers to extend the capabilities of Dreamweaver. Dreamweaver also provides a Document Object Model (DOM), which allows extensions to examine and modify a document's structure and contents.
Using the JavaScript API, you can create objects, behavior actions, commands, Property inspectors, floating panels, and data translators (all of which are collectively called extensions).
You can also create new objects and simple commands without knowing anything about programming; for details, see Creating a simple object and Creating new commands from history steps. But to add more advanced capabilities to Dreamweaver, you must write extensions in either JavaScript or C. For information about the DOM and the API, see Extending Dreamweaver.
After you create a Dreamweaver extension, you can package it and distribute it on the Macromedia Exchange site if you want other Dreamweaver users to be able to use it. For more information, see the Macromedia Exchange for Dreamweaver site. To package an extension, you must first download the Extension Manager installer from that site, then install the Extension Manager.
JavaScript is an interpreted programming language. To learn more about JavaScript, read a good JavaScript book, such as JavaScript Bible by Danny Goodman (IDG) or JavaScript: The Definitive Guide by David Flanagan (O'Reilly). For information on using JavaScript to extend Dreamweaver, see Extending Dreamweaver.
Note: Despite the resemblance between the two names, JavaScript is not related to Java in any way.
All the commands in Dreamweaver menus, including those you create and save using the History panel (see Creating new commands from history steps), are implemented in JavaScript. This JavaScript code usually consists mostly of calls to functions provided by the Dreamweaver extensibility API. If you know JavaScript and understand the Dreamweaver extensibility API, you can edit the JavaScript to change the operation of Dreamweaver commands.
Note: Don't attempt to change any JavaScript code unless you're certain you know what you're doing. Even if you do know what you're doing, make a backup copy of the file containing the code before you modify it.
To rename a command, move a command to a different menu, or add a keyboard shortcut to a command, see About customizing Dreamweaver menus.