Specifications

588
Example
The following sequence of steps provide an example of how to use the
dreamweaver.scanSourceString() function.
Steps
1 You create an implementation for one or more of the seven callback functions.
2 You write a script that calls the dreamweaver.scanSourceString() function.
3 The dreamweaver.scanSourceString() function passes a string that contains HTML and
pointers to the callback functions that you wrote. For example, suppose the string of HTML is
"<font size=2>hello</font>".
4 Dreamweaver analyzes the string and determines that the string contains a font tag.
Dreamweaver calls the callback functions in the following sequence:
The openTagBegin() function
The attribute() function (for the size attribute)
The openTagEnd() function
The text() function (for the "hello" string)
The closeTagBegin() and closeTagEnd() functions
Source view functions
Source view functions include operations that are related to editing document source code (and
that have subsequent impact on the Design view). The functions in this section let you add
navigational controls to Code views within a split document view, the Code inspector, and the
JavaScript Debugger window.
dom.formatRange()
Availability
Dreamweaver MX
Description
Applies Dreamweaver automatic syntax formatting to a specified range of characters in the source
view according to the settings in the Preferences > Code Format dialog box.
Arguments
startOffset, endOffset
startOffset is an integer that represents the beginning of the specified range as the offset
from the beginning of the document.
endOffset is an integer representing the end of the specified range as the offset from the
beginning of the document.
Returns
Nothing.