42
The Design Notes API
MMNotes.getKeys()
Description
This function gets a list of all the keys in a Design Notes file.
Arguments
fileHandle
■
The
fileHandle
argument is the file handle that the
MMNotes.open()
function returns.
Returns
An array of strings where each string contains the name of a key.
Example
The following code might be used in a custom floating panel to display the Design Notes
information for the active document:
var noteHandle = MMNotes.open(dw.getDocumentDOM().URL);
var theKeys = MMNotes.getKeys(noteHandle);
var noteString = "";
var theValue = "";
for (var i=0; i < theKeys.length; i++){
theValue = MMNotes.get(noteHandle,theKeys[i]);
note= theKeys[i] + " = " th "\n";
}
document.theForm.bigTextField.value = noteString;
// always close noteHandle
MMNotes.close(noteHandle);
MMNotes.getSiteRootForFile()
Description
This function determines the site root for the specified Design Notes file.
Arguments
fileURL
■
The
fileURL
argument, which is expressed as a file:// URL, is the path to a local file.
Returns
A string that contains the path of the Local Root folder for the site, which is expressed as a
file:// URL, or an empty string if Dreamweaver is not installed or the Design Notes file is
outside any site that is defined with Dreamweaver. This function searches for all the sites that
are defined in Dreamweaver.
000_DW_API_Print.book Page 42 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...