Dom.newblock(), Dom.notifyflashobjectchanged() – Adobe Dreamweaver API Reference CS5 User Manual
Page 462

457
DREAMWEAVER API REFERENCE
Code
Last updated 8/27/2013
Arguments
contentToInsert, {bReplaceCurrentSelection}
•
The contentToInsert argument is the content that you want to insert.
•
The bReplaceCurrentSelection argument, which is optional, is a Boolean value that indicates whether the content
should replace the current selection. If the bReplaceCurrentSelection argument is a value of
true
, the content
replaces the current selection. If the value is
false
, the content is inserted after the current selection.
Returns
Nothing.
Example
The following code inserts the text:
<b>130</b>
into the current document:
var theDOM = dreamweaver.getDocumentDOM();
theDOM.insertText('130');
The results appear in the Document window.
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
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.