How To Create An Extension; About Adobe Golive Cs2 Extensions; What Can Extensions Do - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

2

How to Create an Extension

Like a plug-in, an extension provides new capabilities to its host environment. With the GoLive CS2 SDK,
you can use ExtendScript (Adobe's ECMAScript-compliant version of JavaScript) and HTML to create
extensions that extend and customize the Adobe GoLive web-design environment.

About Adobe GoLive CS2 Extensions

An extension that you create for Adobe GoLive CS2 using the SDK is actually an HTML file that GoLive uses
in a special way. Creating an extension is similar to creating a web page: you add tags and scripts to this
file to define content. Instead of defining content for a web page, however, you use tags that define
menus, dialogs, palettes, inspectors, and additional objects in the GoLive design environment. You can
also create custom tags to define objects of your own.
When GoLive loads an extension, it makes the object defined in that extension available to GoLive users
through the GoLive UI and through UI elements that you define.
You can add to the GoLive menus, and create your own menus.
You can add to GoLive windows—for example, add custom components to the Objects palette—or
create your own dialogs and palettes.
You can create custom elements, to extend the kind of markup a user can add to a page with GoLive's
simple drag-and-drop technique, and customize the GoLive Inspector to make it display and modify
your component's attributes.
You can extend GoLive to integrate with other applications, web services, and more.

What can extensions do?

One of the most popular uses of an extension is the programmatic editing of files written in HTML, XML,
ASP, JSP, and other markup languages.
To ease your learning curve, GoLive allows you to use familiar tools for this task. The JavaScript DOM in
GoLive works just like the one in a web browser, providing programmatic access to the markup elements
in an HTML file through the markup object. You can edit HTML files just as a browser or other HTML editor
would.
The SDK can operate directly on documents in Layout view, allowing you to create extensions that
automate the creation or modification of HTML pages. The SDK can also operate on documents without
displaying them, enabling extensions to process batches of files rapidly.
In addition to supporting standard JavaScript DOM events, GoLive provides additional events that support
the programmatic modification of documents and sites in the GoLive design environment. Responding to
an event in your extension is similar to responding to one in a web page: you define an appropriately
named JavaScript function within the HTML file's <script> element. For example, to respond to the
selection event, you define and register a handler function for that event inside a <script> element in
the Main.html file that defines the extension.
The GoLive DOM supports not just HTML, but XML (Extensible Markup Language). This ability enables
GoLive to recognize other markup languages, such as those which define server-side tags, as well as the
18

Advertisement

Table of Contents
loading

Table of Contents