User Guide
Code view functions 419
dom.source.previousWord()
Availability
Dreamweaver 4.
Description
Moves the insertion point to the beginning of the previous word (or words, if specified) in Code
view. If content is already selected, this function extends the selection to the left.
Arguments
{nTimes}
, {bShiftIsDown}
• The nTimes argument, which is optional, is the number of words that the insertion point must
move. If
nTimes is omitted, the default is 1.
• The bShiftIsDown argument, which is optional, is a Boolean value that indicates whether
content is being selected. If
bShiftIsDown is true, the content is selected.
Returns
Nothing.
dom.source.replaceRange()
Availability
Dreamweaver 4.
Description
Replaces the range of source text between startOffset and endOffset with string. If
startOffset is greater than endOffset or if either offset is not a positive integer, it does nothing
and returns
false. If endOffset is greater than the number of characters in the file, it replaces
the range between
startOffset and the end of the file. If both startOffset and endOffset are
greater than the number of characters in the file, it inserts the text at the end of the file.
Arguments
startOffset
, endOffset, string
• The startOffset argument is the offset that indicates the beginning of the block to replace.
• The endOffset argument is the offset that indicates the end of the block to replace.
• The string argument is the string to insert.
Returns
A Boolean value: true if successful; false otherwise.
000_DW_API_Print.book Page 419 Wednesday, August 20, 2003 9:14 AM