Adobe Extending Dreamweaver CS4 Instrukcja Użytkownika Strona 196

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 387
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 195
190
EXTENDING DREAMWEAVER CS4
Toolbars
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 true value or if 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
domRequired attribute in a toolbar item tag.
Arguments
None.
Returns
Dreamweaver expects a Boolean value: true if the DOM is required; false otherwise.
Example
function isDOMRequired()
{
return false;
}
Przeglądanie stron 195
1 2 ... 191 192 193 194 195 196 197 198 199 200 201 ... 386 387

Komentarze do niniejszej Instrukcji

Brak uwag