User Guide

General editing functions 509
Returns
Nothing.
Example
The following code inserts the text: <b>130</b> into the current document:
var theDOM = dreamweaver.getDocumentDOM();
theDOM.insertText('<b>130</b>');
The results appear in the Document window, as shown in the following figure:
dom.newBlock()
Availability
Dreamweaver 3.
Description
Creates a new block with the same tag and attributes as the block that contains the current
selection or creates a new paragraph if the pointer is outside all blocks.
Arguments
None.
Returns
Nothing.
Example
If the current selection is inside a center-aligned paragraph, a call to the dom.newBlock()
function inserts
<p align="center"> after the current paragraph.
000_DW_API_Print.book Page 509 Wednesday, July 20, 2005 11:58 AM