How Property inspector files work
At start up, Adobe Dreamweaver reads the first line of each HTM and HTML file in the Configuration/Inspectors folder, searching for the comment string that defines the type, priority, and selection type of a Property inspector. Files that do not have this comment as their first line are ignored.
When the user makes a selection in Adobe Dreamweaver or moves the insertion point to a different location, the following events occur:
- Adobe Dreamweaver searches for any inspectors that have a
withinselection type. - If there are any
withininspectors, Adobe Dreamweaver searches up the document tree from the currently selected tag to check whether there are inspectors for any tags that surround the selection. If there are nowithininspectors, Adobe Dreamweaver searches for any inspectors that have a selection type ofexact. - For the first tag that has one or more inspectors, Adobe Dreamweaver calls each inspector's
canInspectSelection()function. If this function returns the valuefalse, Adobe Dreamweaver no longer considers the inspector a candidate for inspecting the selection. - If more than one potential inspector remains after calling the
canInspectSelection()function, Adobe Dreamweaver sorts the remaining inspectors by priority. - If more than one potential inspector shares the same priority, Adobe Dreamweaver selects an inspector alphabetically by name.
- The selected inspector appears in the Property inspector floating panel. If the Property inspector file defines the
displayHelp()function, a small question mark (?) icon appears in the upper-right corner of the inspector. - Adobe Dreamweaver calls the
inspectSelection()function to gather information about the current selection and populate the inspector's fields. - Event handlers attached to the fields in the Property inspector interface execute as the user encounters them. (For example, you might have an
onBlurevent that calls thesetAttribute()function to set an attribute to the value that the user enters.)