ADOBE SYSTEMS INCORPORATED

Copyright 2000-2002 Adobe Systems Incorporated
All Rights Reserved

NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the Adobe license agreement accompanying it. If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the prior written permission of Adobe.


Extension Name: Redefine Tag Selective

Folder Name: RedefineTagSelective


Description:

This extension shows a how to selectively redefine a standard GoLive tag, display a custom box associated with that tag, add custom attributes, and create a customized Inspector.

If you want to customize all instances of a standard GoLive tag, please see the RedefineTag sample.

Note: Do not enable both the RedefineTag and RedefineTagSelective extensions in the same GoLive session. If both extensions are loaded, when switching to source view and back, the image tag or redefined image tag will become invisible.

This extension redefines a tag by wrapping the GoLive tag in a custom tag of type binary. The extension is responsible for drawing the custom box for this tag, and the tags inside the custom tag aren't accessible to the inspector. The GoLive SDK allows the programmer to handle these custom tags. As a rule, HTML browsers ignore these unknown tags.

This example defines a custom tag called MyImg which is added to the Objects palette Basic tab. MyImg contains the Image tag. When MyImg is dropped on a document, the following markup is written:

<myimg><img height=20 width=30 src="none" abc="alpha"></myimg>

The MyImg Inspector allows the user to view and to set the values in the embedded Img tag, including the custom abc attribute. This is only a partial re-implementation of the Image Inspector. When MyImg is dropped onto a page, it displays its own custom box rather than the Image icon. This sample also shows how to set a urlgetter control in an Inspector.

Palette: Adds My Image Tag to the Objects palette Basic tab.

How to use:

In the Objects Palette, select the Basic tab. Select My Image Tag and drop it onto an HTML page. Select the My Image Tag that was dropped onto the page. In the Inspector, view or modify settings for height, width, source, and the abc attribute.

From the Objects Palette, Basic tab, drop an Image object onto the page. This inserts the standard GoLive Image tag on the page.


Module Definition:

Scripts:


User Interface Tags:

Image Define images here. These are referenced by the picture attribute of the jsxpaletteentry and jsxpalettegroup tags.

Custom Tags Define custom tags attributes in the jsxelement tag.

Palette Group Define a new tab for the Object Palette, or add to an existing tab.

Inspectors Define Inspectors for custom tags