A Simple Property Inspector Example - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

For the first tag that has one or more inspectors, Dreamweaver calls each inspector's
3
function. If this function returns the value
inspecting the selection.
If more than one potential inspector remains after calling the
4
sorts the remaining inspectors by priority.
5
If more than one potential inspector shares the same priority, Dreamweaver selects an inspector alphabetically by
name.
The selected inspector appears in the Property inspector floating panel. If the Property inspector file defines the
6
function, a small question mark (?) icon appears in the upper-right corner of the inspector.
displayHelp()
7
Dreamweaver calls the
populate the inspector's fields.
Event handlers attached to the fields in the Property inspector interface execute as the user encounters them. (For
8
example, you might have an
that the user enters.)

A simple Property inspector example

The following Property inspector inspects the
The example lets you set the value of the
tag's other attributes, use this example as a model.
marquee
You create this extension by performing the following steps:
• "Creating the user interface" on page 212
• "Writing the JavaScript code" on page 213
• "Creating the image" on page 215
• "Testing the Property inspector" on page 215
Creating the user interface
You create an HTML file that contains a form, which appears in the Property inspector.
To create the user interface:
Create a new blank file.
1
2
As the first line of the file, add the comment that identifies the Property inspector, as follows:
<!-- tag:MARQUEE,priority:9,selection:exact,vline,hline -->
3
To specify the document title and the JavaScript file that you will create, add the following after the comment:
<HTML>
<HEAD>
<TITLE>Marquee Inspector</TITLE>
<SCRIPT src="marquee.js"></SCRIPT>
</HEAD>
<BODY>
, Dreamweaver no longer considers the inspector a candidate for
false
function to gather information about the current selection and
inspectSelection()
event that calls the
onBlur
marquee
direction
canInspectSelection()
function to set an attribute to the value
setAttribute()
tag, which is available only in Microsoft Internet Explorer.
attribute in the Property inspector. To set the value of the
DREAMWEAVER CS3
Extending Dreamweaver
canInspectSelection()
function, Dreamweaver
212

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents