Adobe 38040334 - Dreamweaver CS3 User Manual page 191

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

Advertisement

function isCommandChecked()
{
var bChecked = false;
var style = arguments[0];
var textFormat = dw.getDocumentDOM().getTextFormat();
if (dw.getDocumentDOM() == null)
bChecked = false;
if (style == "(None)")
bChecked = (dw.cssStylePalette.getSelectedStyle() == '' || textFormat ==
"" || textFormat == "P" || textFormat == "PRE");
else if (style == "Heading 1")
bChecked =0(textFormat == "h1");
else if (style == "Heading 2")
bChecked =0(textFormat == "h2");
else if (style == "Heading 3")
bChecked =0(textFormat == "h3");
else if (style == "Heading 4")
bChecked =0(textFormat == "h4");
else if (style == "Heading 5")
bChecked =0(textFormat == "h5");
else if (style == "Heading 6")
bChecked =0(textFormat == "h6");
else
bChecked = (dw.cssStylePalette.getSelectedStyle() == style);
return bChecked;
}
isDOMRequired()
Availability
Dreamweaver MX.
Description
Specifies whether the toolbar command requires a valid DOM to operate. If this function returns a
the function is not defined, Dreamweaver assumes that the command requires a valid DOM and synchronizes the
Code view and Design view for the document before executing the associated command. This function is equivalent
to the
attribute in a toolbar item tag.
domRequired
Arguments
None.
Returns
Dreamweaver expects a Boolean value:
Example
function isDOMRequired()
{
return false;
}
if the DOM is required;
true
otherwise.
false
DREAMWEAVER CS3
185
Extending Dreamweaver
value or if
true

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents