Adobe 38040334 API Reference - Page 340
dom.applyCSSStyle, dom.getElementView, flag is specified, Dreamweaver inserts a new
![]() |
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 340 highlights
DREAMWEAVER CS3 335 API Reference Description Gets the descriptions of the available CSS-based layouts Arguments None. Returns String array of layout descriptions. dom.applyCSSStyle() Availability Dreamweaver 4. Description Applies the specified style to the specified element. This function is valid only for the active document. Arguments elementNode, styleName, {classOrID}, {bForceNesting} • The elementNode argument is an element node in the DOM. If the elementNode argument is a null value or an empty string (""), the function acts on the current selection. • The styleName argument is the name of a CSS style. • The classOrID argument, which is optional, is the attribute with which the style should be applied (either "class" or "id"). If the elementNode argument is a null value or an empty string and no tag exactly surrounds the selection, the style is applied using SPAN tags. If the selection is an insertion point, Dreamweaver uses heuristics to determine to which tag the style should be applied. • The bForceNesting argument, which is optional, is a Boolean value, which indicates whether nesting is allowed. If the bForceNesting flag is specified, Dreamweaver inserts a new SPAN tag instead of trying to modify the existing tags in the document. This argument defaults to a false value if it is not specified. Returns Nothing. Example The following code applies the red style to the selection, either by surrounding the selection with SPAN tags or by applying a CLASS attribute to the tag that surrounds the selection: var theDOM = dreamweaver.getDocumentDOM('document'); theDOM.applyCSSStyle('','red'); dom.getElementView() Availability Dreamweaver 8.
![](/manual_guide/products/adobe-38040334-api-reference-b593776/340.png)