User Guide

CSS functions 433
Description
Gets target media type for rendering. The default media type is "screen".
Arguments
None.
Returns
A string value that specifies the target media type.
Example
var mediaType = dw.cssStylePalette.getMediaType();
dreamweaver.cssStylePalette.getSelectedStyle()
Availability
Dreamweaver 3; fullSelector available in Dreamweaver MX.
Description
Gets the name of the style that is currently selected in the Styles panel.
Arguments
fullSelector
The fullSelector argument is a Boolean value that indicates whether the full selector or
only the class should return. If nothing is specified, only the class name returns. For
instance,
p.class1 is a selector that means the style is applied to any p tag of class1, but
it does not apply, for instance, to a
div tag of class1. Without the fullSelector
argument, the dreamweaver.cssStylePalette.getSelectedStyle() function returns
only the class name,
class1, for the selector. The fullSelector argument tells the
function to return
p.class1 instead of class1.
Returns
When the fullSelector argument is a true value, the function returns either the full
selector or an empty string when the stylesheet node is selected.
When the
fullSelector argument is a false value or it is omitted, a string that represents
the class name of the selected style returns. If the selected style does not have a class or a
stylesheet node is selected, an empty string returns.
Example
If the style red is selected, a call to the dw.cssStylePalette.getSelectedStyle()
function returns
"red".
000_DW_API_Print.book Page 433 Wednesday, July 20, 2005 11:58 AM