Dreamweaver 8.
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.
beforeText
beforeText argument is required. It specifies the text to insert at the beginning of the selection, or, if the value of the afterText argument is null, it specifies the text to insert at the beginning of every line in the selection.
afterText
afterText argument, which is optional, specifies the text to insert at the end of the selection.
Nothing.
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