Specifications

Tag Libraries and Editors 117
The <cfweather> tag appears in the list box on the right.
Select cfweather, and click the Insert button.
The tag editor should appear.
Tag editor APIs
In order to create a new tag editor, you must provide an implementation for the three functions
inspectTag(), validateTag(), and applyTag(). For an example of an implementation, see
Creating a tag editor UI on page 115.
inspectTag()
Availability
Dreamweaver MX
Description
When the tag editor first pops up, the function is called. The function is passed the tag that the
user is editing, which is expressed as a
dom object. The function extracts attribute values from the
tag that is being edited and uses these values to initialize form elements in the tag editor.
Arguments
Accepts dom node of the edited tag.
Returns
Dreamweaver expects nothing.
Example
Suppose the user is editing the following tag:
<crfweather zip = “94065”/>
If the editor contains a text field for editing the zip attribute, the function needs to initialize the
form element so that the user sees the actual ZIP code in the text field, rather than an empty field.
The following code performs the initialization:
function inspectTag(tag)
{
document.forms[0].zip.value = tag.zip
}
validateTag()
Availability
Dreamweaver MX
Description
When user clicks on a node in the tree control or clicks OK, the function performs input
validation on the currently displayed HTML form elements.
Arguments
None.