DREAMWEAVER CS3
414
API Reference
Arguments
None.
Returns
Nothing.
dom.stripTag()
Availability
Dreamweaver 3.
Description
Removes the tag from around the current selection, leaving any contents. If the selection has no tags or contains
more than one tag, Dreamweaver reports an error.
Arguments
None.
Returns
Nothing.
dom.wrapTag()
Availability
Dreamweaver 3.
Description
Wraps the specified tag around the current selection. If the selection is unbalanced, Dreamweaver reports an error.
Arguments
startTag
• The
argument is the source that is associated with the opening tag.
startTag
Returns
Nothing.
Example
The following code wraps a link around the current selection:
var theDOM = dw.getDocumentDOM();
var theSel = theDOM.getSelectedNode();
_
if (theSel.nodeType == Node.TEXT
NODE){
theDOM.wrapTag('<a href="foo.html">');
}
dreamweaver.showQuickTagEditor()
Availability
Dreamweaver 3.