The Dreamweaver JavaScript API > File manipulation functions > dom.insertText() |
Availability
Dreamweaver 3.0
Description
Inserts text content into the document at the current insertion point.
Arguments
contentToInsert, {bReplaceCurrentSelection}
contentToInsert is the content you want to insert. |
|
bReplaceCurrentSelection is a Boolean value indicating whether the content should replace the current selection. If bReplaceCurrentSelection is false, the content is inserted after the current selection. |
Returns
Nothing.
Enabler
None.
Example
The following code inserts <b>130</b> into the current document:
var theDOM = dw.getDocumentDOM();
theDOM.insertText('<b>130</b>');
This appears in the Document window as: