Custom Elements; Overview; Tags For Creating Custom Elements - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

6

Custom Elements

This chapter describes the characteristics of custom elements that you can define using the SDK. It
describes how define a custom element, install it in the Objects palette, and provide behavior for it.

Overview

Your extension can define a custom HTML element, and add it to the Objects palette, where a user can
select it and drop it into a page in Layout view. You can completely customize the element's appearance in
Layout view. You can define an Inspector for your element, so that the user can inspect and edit its
attributes.
A custom element has a custom tag name that represents it in the GoLive design environment. This tag
can provide content defined by any combination of other custom tags, SDK-defined tags, and standard
HTML tags.
GoLive has other built-in ways of creating or inserting HTML code in a page, such as templates and
snippets; see the Adobe GoLive CS2 User's Guide for details.
This chapter describes the steps required to create a custom element and add it to the Objects palette:
Define the custom element with its custom tag; see
Add the element to one of the tabs in the Objects palette; see
Palette.
Create and register event-handling functions to define how an instance of the custom element in a
GoLive document window appears in the Layout view and responds to user actions. See
appearance of a custom
Implement the Inspector window that allows the user to edit the custom element's attributes. See
Inspecting a Custom

Tags for creating custom elements

Use the following tags to create custom elements:
The
< jsxelement >
attributes you want.
The <jsxpaletteentry> tag defines the palette entry for a custom element. It specifies what content
is to be added to the page when this item is dropped there, and what picture to show in the Objects
palette.
The <jsxpalettegroup> tag groups palette entries into a new or existing tab on the Objects palette.
The
< jsxinspector >
You can use the
palette entry and tab, and a placeholder image for the custom element in Layout view.
When the user creates an instance of a custom element by dragging the palette entry to a document,
GoLive creates objects for the new document content:
An
element Object
element.
Element.
tag defines the tag name of a custom tag, such as <mytag> . along with any
tag defines the Inspector dialog for the custom element.
tag or the
<img>
createPicture
represents the custom element in a GoLive document.
Defining A Custom
Element.
Creating a Palette Entry in the Objects
global function to specify the images to use for the
Defining the
78

Advertisement

Table of Contents
loading

Table of Contents