dom.source.applyComment()

Availability

Dreamweaver 8.

Description

This function inserts the text specified in the beforeText argument before the current selection and the text specified in the afterText argument after the current selection. The function then extends the current selection to include the added text. However, if there is no current selection, the function does not select anything. If the text specified in the afterText argument is null, the function inserts the text specified in the beforeText argument at the beginning of every line in the current selection.

Arguments

beforeText

afterText

Returns

Nothing.

Example

The following example makes the current selection an HTML comment:

dw.getDocumentDOM().source.applyComment('<!--', '-->')

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/12_wo188.htm