Specifications
17
CHAPTER 2
Extending Dreamweaver MX
Most Dreamweaver extensions are written in HTML and JavaScript. Extensions typically
perform the following types of tasks:
• Automating changes to the user’s current document, such as inserting HTML, CFML, or
JavaScript; changing text or image properties; or sorting tables
• Interacting with the application to automatically open or close windows, open or close
documents, change keyboard shortcuts, and more
• Connecting to data sources, which lets Dreamweaver users create data-driven pages
• Inserting and managing blocks of server code in the current document
You might want to write an extension to handle a commonly used, and therefore repetitive, task,
so this type of extension could be useful to many web developers. You might have a unique need
that can be solved by writing an extension, which might be used only within a specific setting. In
either case, Dreamweaver provides an extensive set of tools that you can use for adding to or
customizing its functionality.
What makes extending possible
There are three main components to Dreamweaver extensibility:
• An HTML parser (also called a renderer), which makes it possible to design user interfaces for
extensions using form fields, layers, images, and other HTML elements. Dreamweaver has its
own HTML parser.
• A JavaScript interpreter, which executes the JavaScript code in extension files. Dreamweaver
MX uses the Netscape Navigator JavaScript 1.5 interpreter. For more information about
changes between this version of the interpreter and previous versions, see “How Dreamweaver
processes JavaScript in extensions” on page 21.
• A series of APIs that provide access to Dreamweaver functionality through JavaScript.
Application programming interfaces in Dreamweaver
Three types of application programming interfaces (API)s are documented in Extending
Dreamweaver:
• Extension APIs, which are discussed in the section, “Extending Dreamweaver MX” on page 17
• Utility APIs, which are discussed in the section, “Utility APIs” on page 269
• Dreamweaver JavaScript APIs, which are discussed in the section, “The Dreamweaver
JavaScript API” on page 371