Dreamweaver.selectall(), String manipulation functions – Adobe Dreamweaver API Reference CS5 User Manual

Page 300

Advertising
background image

295

DREAMWEAVER API REFERENCE

Document

Last updated 8/27/2013

function applyFormatToSelectedTable(){

// get current selection
var selObj = dw.getDocumentDOM().getSelectedNode();
alternateRows(dwscripts.findDOMObject("presetNames").selectedIndex,

findTable());


// restore original selection, if it still exists; if not, just select the
// table.

var selArr;
if (dw.nodeExists(selObj))

selArr = dom.nodeToOffsets(selObj);

else

selArr = dom.nodeToOffsets(findTable());

dom.setSelection(selArr[0],selArr[1]);

}

dreamweaver.selectAll()

Availability
Dreamweaver 3.

Description
Performs a Select All operation in the active document window, the Site panel or, on the Macintosh, the text field that
has focus in a dialog box or floating panel.

Note: If the operation takes place in the active document, it usually selects all the content in the active document. In some
cases (for example, when the insertion point is inside a table), however, it selects only part of the active document. To set
the selection to the entire document, use the

dom.setSelection()

function.

Arguments
None.

Returns
Nothing.

Enabler
See “

dreamweaver.canSelectAll()

” on page 509.

String manipulation functions

String manipulation functions help you get information about a string as well as convert a string from Latin 1 encoding
to platform-native encoding and back.

Advertising