User Guide

396 Chapter 18: Code
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.
dom.notifyFlashObjectChanged()
Availability
Dreamweaver 4.
Description
Tells Dreamweaver that the current Flash object file has changed. Dreamweaver updates the
Preview display, resizing it as necessary, preserving the width-height ratio from the original size.
For example, Flash Text uses this feature to update the text in the Layout view as the user changes
its properties in the Command dialog box.
Arguments
None.
Returns
Nothing.
000_DW_API_Print.book Page 396 Wednesday, August 20, 2003 9:14 AM