Defining A Custom Element; Defining The Tag For A Custom Element; Redefining Tags Locally - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
A
box Object
register event handlers to draw the appearance.
The Inspector that you define using the <jsxinspector> tag interacts with the box object to get and
set properties of the element object.
The <jsxelement> , <jsxpaletteentry> , and <jsxinspector> tags each have a classid
attribute that associates the various components with a particular custom element.

Defining A Custom Element

Use a pair of SDK elements to define a custom element:
The <jsxelement> tag defines the tag name and attributes of the custom element.
The <jsxpaletteentry> tag with the same ID defines the content that GoLive adds to the page when
the user drops this element there. It also specifies a picture to use for this entry in the Objects palette.
The classid attribute associates these elements (and optionally a <jsxinspector> element as well).
The value of a classid attribute can be any text string that is not already used as an identifier elsewhere
in the extension.
For an example of how to use this feature, see the Custom Box sample extension.

Defining the tag for a custom element

The <jsxelement> tag defines the name and type of a custom element in the GoLive environment:
<jsxelement tagName="
type="
</jsxelement>
The tagName value is the name of your custom element. For example, tagName="mytag" defines the
<mytag> custom element in the GoLive environment. The name of a custom tag must consist of
lowercase characters only.
The classid value associates this tag with a <jsxpaletteentry> element, and optionally with a
<jsxinspector> element.
The type value specifies the kind of element this tag defines, such as a binary tag, a container, a
server-side include, or some other kind of element. The type defines certain aspects of the element's
behavior and appearance. For example, if you specify type="head" , when the user drops this
element into a page, it adds its content to the head section of that page. For a complete list valid types,
see the GoLive CS2 SDK Programmer's Reference.
The following example defines the <mytag> tag:
<jsxelement tagName="mytag" classid="myclass" type="plain">
The type value of plain specifies that this is an HTML tag that draws a placeholder graphic in Layout
view.

Redefining Tags Locally

You can create tag definitions that are valid only for a particular language flavor or glue. The glue attribute
of the <
jsxelement
Adobe GoLive CS2 SDK
represents the custom element's appearance in Layout view. You must define and
nameOfCustomTag
kindOfElement
">
> tag specifies the context for the custom element that it defines.
yourUniqueID
" classid="
Custom Elements
79
"

Advertisement

Table of Contents
loading

Table of Contents