
1157
Customizing Dreamweaver
33
selection
■■
—Depending on the current selection, the cursor is either within a particular
tag or exactly enclosing it. The selection attribute is set to
within or exact, according to
the condition under which the Property inspector should be displayed.
hline
■■
—Inserts a 1-pixel horizontal gray line (see Figure 33-6) dividing the upper and
lower halves of the expanded Property inspector.
vline
■■
—Places a 1-pixel vertical gray line (see Figure 33-6) between the tag’s name field
and the other properties on the upper half of the Property inspector.
FIGURE 33-6
The Property inspector for the
<img> tag uses both the hline and vline attributes.
The canInspectSelection() function
To control the circumstances under which your custom Property inspector is displayed, use the
canInspectSelection() function. Like canAcceptBehavior() and canAcceptCommand()
for behaviors and commands, respectively, if
canInspectSelection() returns true, the custom
Property inspector is shown; if it returns
false, the Property inspector is not shown.
As noted earlier, the
canInspectSelection() function is mandatory. If no conditions exist under
which the Property inspector should not be displayed, use the following code:
function canInspectSelection() {
return true;
}
Access to several of the standard Dreamweaver <head> elements’ Property inspector files is
restricted by the
canInspectSelection() ...