beautypg.com

Dom.source.indenttextview(), Dom.source.insert(), Dom.source.nextword() – Adobe Dreamweaver API Reference CS5 User Manual

Page 483

background image

478

DREAMWEAVER API REFERENCE

Code

Last updated 8/27/2013

var offset = dw.getDocumentDOM().source.getSelection()[0];

var errors = dw.getDocumentDOM().source.getValidationErrorsForOffset(offset);
if ( errors && errors.length > 0 )

alert( errors[0].message );

dom.source.indentTextview()

Availability
Dreamweaver 4.

Description
Moves selected Code view text one tab stop to the right.

Arguments
None.

Returns
Nothing.

dom.source.insert()

Availability
Dreamweaver 4.

Description
Inserts the specified string into the source code at the specified offset from the beginning of the source file. If the offset
is not greater than or equal to zero, the insertion fails and the function returns

false

.

Arguments
offset, string

The offset argument is the offset from the beginning of the file where the string must be inserted.

The string argument is the string to insert.

Returns
A Boolean value:

true

if successful;

false

otherwise.

dom.source.nextWord()

Availability
Dreamweaver 4.

Description
Moves the insertion point to the beginning of the next word (or words, if specified) in the Code view. If content is
already selected, this function extends the selection to the right.