The Dreamweaver API Reference describes two application programming interfaces (APIs) that let you perform various supporting tasks when developing Macromedia Dreamweaver 8 extensions and adding program code to your Dreamweaver web pages. These two APIs are the utility API and the JavaScript API. The utility API contains subsets of related functions that let you perform specific types of tasks. The utility API includes the following API subsets: - The File I/O API, which lets you read and write files on the local file system
- The HTTP API, which lets you send and receive information from a web server
- The Design Notes API, which lets you store and retrieve notes about Dreamweaver documents
- The Fireworks Integration API, which lets you communicate with Macromedia Fireworks
- Flash Integration, which contains information about adding Flash elements to the Dreamweaver user interface (UI) and details on the Flash Objects API (which lets you build objects that create Macromedia Flash content)
- The Database API, which lets you access information stored in databases and manage database connections
- The Database Connectivity API, which lets you create a new connection type and corresponding dialog boxes for new or existing server models
- The JavaBeans API, which retrieves class names, methods, properties, and events for JavaBeans that you have defined
- The Source Control Integration API, which lets you write shared libraries to extend the Dreamweaver Check In/Check Out feature
The extensive JavaScript API lets you perform a diverse set of smaller tasks, many of which are tasks that a user would perform when creating or editing Dreamweaver documents. These API functions are grouped by the parts of the Dreamweaver UI that they affect. For example, the JavaScript API includes Workspace functions, Document functions, Design functions, and so on. These functions let you perform tasks such as opening a new document, getting or setting a font size, finding the occurrence of a search string in HTML code, making a toolbar visible, and much more. Background This book assumes that you are familiar with Dreamweaver, HTML, XML, JavaScript programming and, if applicable, C programming. If you are writing extensions for building web applications, you should also be familiar with server-side scripting on at least one platform, such as Active Server Pages (ASP), ASP.net, PHP: Hypertext Preprocessor (PHP), ColdFusion, or Java Server Pages (JSP). Extending Dreamweaver To learn about the Dreamweaver framework and the API that enables you to build Dreamweaver extensions, see Extending Dreamweaver. Extending Dreamweaver describes the API functions that Dreamweaver calls to implement the objects, menus, floating panels, server behaviors, and so on, that comprise the various features of Dreamweaver. You can use those APIs to add objects, menus, floating panels, or other features to the product. Extending Dreamweaver also explains how to customize Dreamweaver by editing and adding tags to various HTML and XML files to add menu items or document types, and so on. Additional resources for extension writers To communicate with other developers who are involved in writing extensions, you might want to join the Dreamweaver extensibility newsgroup. You can access the website for this newsgroup at www.macromedia.com/go/extending_newsgrp/. New functions in Dreamweaver 8 The following new functions have been added to the Dreamweaver 8 JavaScript API. The headings designate the chapters and sections that contain the new functions: Application The following Global application functions have been added to the Application chapter. Global application Workspace The following new Window, Code collapse, and Code view toolbar functions have been added to the Workspace chapter. Window dreamweaver.cascade() on page 735 (added support for the Macintosh) dreamweaver.tileHorizontally() on page 743 (added support for the Macintosh) dreamweaver.tileVertically() on page 744 (added support for the Macintosh) Code collapse dom.collapseFullTag() on page 745 dom.collapseSelectedCodeFragment() on page 747 dom.collapseSelectedCodeFragmentInverse() on page 747 dom.expandAllCodeFragments() on page 748 dom.expandSelectedCodeFragments() on page 749 dreamweaver.htmlInspector.collapseFullTag() on page 749 dreamweaver.htmlInspector.collapseSelectedCodeFragment() on page 750 dreamweaver.htmlInspector.collapseSelectedCodeFragmentInverse() on page 751 dreamweaver.htmlInspector.expandAllCodeFragments() on page 752 dreamweaver.htmlInspector.expandSelectedCodeFragments() on page 752 Code view toolbar dom.getOpenPathName() on page 753 dom.getShowHiddenCharacters() on page 753 dom.setShowHiddenCharacters() on page 754 dom.source.applyComment() on page 755 dom.source.removeComment() on page 755 dreamweaver.htmlInspector.getShowHiddenCharacters() on page 756 dreamweaver.htmlInspector.setShowHiddenCharacters() on page 757 Site The following new Site functions have been added to the Site chapter. Site dom.getSiteURLPrefixFromDoc() on page 760 dom.localPathToSiteRelative() on page 761 dom.siteRelativeToLocalPath() on page 761 dreamweaver.compareFiles() on page 762 dreamweaver.siteSyncDialog.compare() on page 763 dreamweaver.siteSyncDialog.markDelete() on page 764 dreamweaver.siteSyncDialog.markGet() on page 764 dreamweaver.siteSyncDialog.markIgnore() on page 765 dreamweaver.siteSyncDialog.markPut() on page 765 dreamweaver.siteSyncDialog.markSynced() on page 766 site.compareFiles() on page 771 site.getAppURLPrefixForSite() on page 778 site.getSiteURLPrefix() on page 784 site.serverActivity() on page 794 site.siteRelativeToLocalPath() on page 798 Document The following new File manipulation functions have been added to the Document chapter. File manipulation dreamweaver.getNewDocumentDOM() on page 816 (added new argument) MMXSLT.getXMLSchema() on page 855 MMXSLT.getXMLSourceURI() on page 856 MMXSLT.launchXMLSourceDialog() on page 857 Page content The following new Clipboard functions have been added to the Page content chapter: Clipboard Design The following new CSS, Layout view, and Zoom functions have been added to the Design chapter: CSS cssStylePalette.getInternetExplorerRendering() on page 923 cssStylePalette.setInternetExplorerRendering() on page 924 dom.getElementView() on page 925 dom.getShowDivBackgrounds() on page 926 dom.getShowDivBoxModel() on page 926 dom.getShowDivOutlines() on page 927 dom.resetAllElementViews() on page 928 dom.setElementView() on page 929 dom.setShowDivBackgrounds() on page 930 dom.setShowDivBoxModel() on page 930 dom.setShowDivOutlines() on page 931 dreamweaver.cssStylePalette.applySelectedStyle() on page 932 (added new argument) dreamweaver.cssStylePalette.deleteSelectedStyle() on page 933 (added new argument) dreamweaver.cssStylePalette.duplicateSelectedStyle() on page 934 (added new argument) dreamweaver.cssStylePalette.editSelectedStyle() on page 934 (added new argument) dreamweaver.cssStylePalette.editSelectedStyleInCodeview() on page 935 dreamweaver.cssStylePalette.getDisplayStyles() on page 936 dreamweaver.cssStylePalette.renameSelectedStyle() on page 940 dreamweaver.cssStylePalette.setDisplayStyles() on page 940 dreamweaver.getBlockVisBoxModelColors() on page 941 dreamweaver.getBlockVisOutlineProperties() on page 942 dreamweaver.getDivBackgroundColors() on page 943 dreamweaver.setBlockVisOutlineProperties() on page 943 dreamweaver.setDivBackgroundColors() on page 944 Layout view dom.getShowBlockBackgrounds() on page 963 dom.getShowBlockBorders() on page 963 dom.getShowBlockIDs() on page 964 dom.getShowBoxModel() on page 965 dom.setShowBlockBackgrounds() on page 965 dom.setShowBlockBorders() on page 966 dom.setShowBlockIDs() on page 966 dom.setShowBoxModel() on page 967 Zoom dreamweaver.activeViewScale() on page 968 dreamweaver.fitAll() on page 969 dreamweaver.fitSelection() on page 969 dreamweaver.fitWidth() on page 970 dreamweaver.zoomIn() on page 970 dreamweaver.zoomOut() on page 971 Guide dom.clearGuides() on page 972 dom.createHorizontalGuide() on page 972 dom.createVerticalGuide() on page 973 dom.deleteHorizontalGuide() on page 974 dom.deleteVerticalGuide() on page 974 dom.guidesColor on page 975 dom.guidesDistanceColor on page 975 dom.guidesLocked on page 976 dom.guidesSnapToElements on page 977 dom.guidesVisible on page 977 dom.hasGuides() on page 978 dom.hasHorizontalGuide() on page 978 dom.hasVerticalGuide() on page 979 Enablers The following new functions have been added to the Enablers chapter: dreamweaver.canFitSelection() on page 1072 dreamweaver.canPasteSpecial() on page 1072 dreamweaver.canZoom() on page 1078 dreamweaver.cssStylePalette.canApplySelectedStyle() on page 1079 (added new argument) dreamweaver.cssStylePalette.canDeleteSelectedStyle() on page 1079 (added new argument) dreamweaver.cssStylePalette.canDuplicateSelectedStyle() on page 1080 (added new argument) dreamweaver.cssStylePalette.canEditSelectedStyle() on page 1081 (added new argument) dreamweaver.cssStylePalette.canEditSelectedStyleInCodeview() on page 1081 dreamweaver.cssStylePalette.canRenameSelectedStyle() on page 1082 dreamweaver.siteSyncDialog.canCompare() on page 1086 dreamweaver.siteSyncDialog.canMarkDelete() on page 1087 dreamweaver.siteSyncDialog.canMarkGet() on page 1087 dreamweaver.siteSyncDialog.canMarkIgnore() on page 1088 dreamweaver.siteSyncDialog.canMarkPut() on page 1088 dreamweaver.siteSyncDialog.canMarkSynced() on page 1089 site.canCompareFiles() on page 1093 Removed functions The following functions have been removed from the Dreamweaver 8 API because the associated features have been removed from the product. Errata A current list of known issues can be found in the Extensibility section of the Dreamweaver Support Center (www.macromedia.com/go/extending_errata). Conventions used in this guide The following typographical conventions are used in this guide: Code font indicates code fragments and API literals, including class names, method names, function names, type names, scripts, SQL statements, and both HTML and XML tag and attribute names. Italic code font indicates replaceable items in code. The continuation symbol (¬) indicates that a long line of code has been broken across two or more lines. Due to margin limits in this book's format, what is otherwise a continuous line of code must be split. When copying the lines of code, eliminate the continuation symbol and type the lines as one line. Curly braces ({ }) that surround a function argument indicate that the argument is optional. Function names that have the prefix dreamweaver.funcname can be abbreviated to dw.funcname when you are writing code. This manual uses the full dreamweaver. prefix when defining the function and in the index. Many examples use the dw. prefix, however. The following naming conventions are used in this guide: |