Adobe 38040334 API Reference - Page 428
dom.source.indentTextview, dom.source.insert, The following example calls
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 428 highlights
DREAMWEAVER CS3 423 API Reference Returns An array of objects or the value null. Each object in the array has the following properties: • The message object is a string that contains the error message. • The floaterName object is a string that contains the name of the results window. You can pass this value to the showResults() or setFloaterVisibility() functions. • The floaterIndex object is an index of items in the floater results list. • The start object is the opening index of underlined code. • The end object is the closing index of underlined code. Note: The returned floater indexes should not be stored because they can change frequently, such as when documents are opened or closed. Example The following example calls getValidationErrorsForOffset() to check for any errors at the offset of the current selection. If the function returns an error, the code calls the alert() function to display the error message to the user. 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.