Extending ADOBE® DREAMWEAVER® CS4
4Chapter 2: Customizing DreamweaverIn addition to creating and using Adobe Dreamweaver extensions, you can customize Dreamweaver in many ways, which l
94EXTENDING DREAMWEAVER CS4User interfaces for extensions<html xmlns:MMStr ing="http://www.adobe.com /schemes/data/ string/"> <h
95Chapter 6: The Dreamweaver Document Object ModelIn Adobe Dreamweaver, the Document Object Model (DOM) is a critically important structure for extens
96EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelIf you are familiar with JavaScript in browsers, you can reference objects in the acti
97EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelObject Properties Methods Eventswindow navigator •document •innerWidth •innerHeight •s
98EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object Modelform In addition to the properties that are available for all tags: tags:elements • (a
99EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperties and methods of the document object The following table details the properti
100EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperty or method Return valuenodeType • Node.DOCUMENT_NODEparentNode • null paren
101EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperties and methods of HTML The following table lists the properties and methods o
102EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperties and methods of text objects Each contiguous block of text in an HTML docum
103EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelThe dreamweaver and site objectsDreamweaver implements the standard objects that are
5EXTENDING DREAMWEAVER CS4Customizing DreamweaverChange the appearance of a dialog box1 In Dreamweaver, select Edit > Preferences, and then select
104Chapter 7: Insert bar objectsYou can add items to the Insert bar to automate repetitive tasks for your users or even create dialog boxes for users
105EXTENDING DREAMWEAVER CS4Insert bar objects2 If Dreamweaver displays a dialog box in step 1, the user enters parameters for the object (such as the
106EXTENDING DREAMWEAVER CS4Insert bar objects<insertbar>DescriptionThis tag signals the content of the Insert bar definition file. The </ins
107EXTENDING DREAMWEAVER CS4Insert bar objectsExample <menubutton id="DW_ImageMenu" name="Images" image="Common\imageme
108EXTENDING DREAMWEAVER CS4Insert bar objects<separator />DescriptionThis tag displays a vertical line on the Insert bar.Attributes{showIf}Exam
109EXTENDING DREAMWEAVER CS4Insert bar objectsshowIf="enabler"DescriptionThis attribute specifies that this button should appear on the Inse
110EXTENDING DREAMWEAVER CS4Insert bar objectscommand="API_function"DescriptionInstead of referring Dreamweaver to an HTML file that contain
111EXTENDING DREAMWEAVER CS4Insert bar objectsModifying the Insert barYou can move objects from one category to another, rename categories, and comple
112EXTENDING DREAMWEAVER CS4Insert bar objectsCreate a new category1 Save a backup copy of insertbar.xml (with a name such as “insertbar.backup.xml”).
113EXTENDING DREAMWEAVER CS4Insert bar objectsBecause this example performs text manipulation, you may want to explore some of the objects from the Te
6EXTENDING DREAMWEAVER CS4Customizing Dreamweaver2 Open Extensions.txt in a text editor. 3 Add a new line for each new file type. In capital letters,
114EXTENDING DREAMWEAVER CS4Insert bar objectsWithin the objectTag() function, use dw.getFocus() to determine whether the Code view is the current vie
115EXTENDING DREAMWEAVER CS4Insert bar objects5 Save the file that now contains the JavaScript functions as Strikethrough.js in the Configuration/Obje
116EXTENDING DREAMWEAVER CS4Insert bar objectsAdding a dialog boxYou can add a form to your object to let the user enter parameters before Dreamweaver
117EXTENDING DREAMWEAVER CS4Insert bar objects2 Save the file as Strikethrough.htm.3 Reload the extensions (see “Reloading extensions” on page 78).Te
118EXTENDING DREAMWEAVER CS4Insert bar objects• Strike through the content they want to remove or make new content blueOrganize the files1 Create a ne
119EXTENDING DREAMWEAVER CS4Insert bar objectsCreate the image1 Create a GIF file that is 18 x 18 pixels, which looks like the following figure:2 Save
120EXTENDING DREAMWEAVER CS4Insert bar objects <button id="DW_Blue_Text" image="Editorial\AddBlue.gif name="Blue Text" fil
121EXTENDING DREAMWEAVER CS4Insert bar objectsExample The following code tells Dreamweaver to check to see that the document contains a particular str
122EXTENDING DREAMWEAVER CS4Insert bar objectsinsertObject() AvailabilityDreamweaver MX.Description This function is required if the objectTag() funct
123EXTENDING DREAMWEAVER CS4Insert bar objectsobjectTag()DescriptionThe objectTag() and insertObject() functions are mutually exclusive: If both are d
7EXTENDING DREAMWEAVER CS4Customizing DreamweaverString-delimited tags start with one string and end with another string. They are like empty HTML tag
124EXTENDING DREAMWEAVER CS4Insert bar objectsReturnsDreamweaver expects a string of the form "widthInPixels,heightInPixels".The returned di
125Chapter 8: Browser compatibility check issues APIIn Adobe Dreamweaver, the browser compatibility check (BCC) feature helps you create page layouts
126EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIColAndColgroupCapturedByCaption.htm <!DOCTYPE HTML SYSTEM "-// //DWExtensi
127EXTENDING DREAMWEAVER CS4Browser compatibility check issues API // if styles are declared for any colgroup or col // tag in thi
128EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIDescriptionSearches the document for the combination of CSS and HTML that will trigg
129EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIgetAffectedBrowserDisplayNames()AvailabilityDreamweaver CS3.DescriptionProvides Drea
130EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIDescriptionProvides Dreamweaver with the name or a short description of the issue.Ar
131Chapter 9: CommandsAdobe Dreamweaver commands can perform almost any kind of edit to a user’s current document, other open documents, or any HTML d
132EXTENDING DREAMWEAVER CS4CommandsAdding commands to the Commands menuDreamweaver automatically adds any files that are inside the Configuration/Com
133EXTENDING DREAMWEAVER CS4Commands <!DOCTYPE HTML SYSTEM "-//Adobe//DWExtension layout-engine 10.0//dialog"> <HTML> <HEAD
8EXTENDING DREAMWEAVER CS4Customizing Dreamweaver• start_string specifies a delimiter that marks the beginning of a string-delimited tag. String-delim
134EXTENDING DREAMWEAVER CS4CommandsDetermine whether the command should be enabled or dimmedThe first task in creating a command is to determine when
135EXTENDING DREAMWEAVER CS4CommandsOtherwise, canAcceptCommand() returns the value false and Dreamweaver dims the item, as shown in the following fig
136EXTENDING DREAMWEAVER CS4Commands function changeCase() { var uorl; // Check whether user requested uppercase or lowercase. if (document.forms
137EXTENDING DREAMWEAVER CS4CommandsThe changeCase() function first tests the property document.forms[0].elements[0].checked. The document.forms[0].el
138EXTENDING DREAMWEAVER CS4CommandscanAcceptCommand()DescriptionThis function determines whether the command is appropriate for the current selection
139EXTENDING DREAMWEAVER CS4CommandsExampleThe following instance of commandButtons() defines three buttons: OK, Cancel, and Help that appear at the u
140EXTENDING DREAMWEAVER CS4CommandsreceiveArguments()DescriptionThis function processes any arguments that pass from a menu item or from the dw.runCo
141Chapter 10: Menus and menu commandsAdobe Dreamweaver creates all its menus from the structure defined in the menus.xml file in the Dreamweaver Conf
142EXTENDING DREAMWEAVER CS4Menus and menu commands<menubar>DescriptionProvides information about a menu bar in the Dreamweaver menu structure.A
143EXTENDING DREAMWEAVER CS4Menus and menu commandsContentsThis tag can contain one or more menuitem tags, and one or more separator tags. It can also
9EXTENDING DREAMWEAVER CS4Customizing DreamweaverHow custom tags appear in the Design viewThe way that custom tags appear in the Design view of the Do
144EXTENDING DREAMWEAVER CS4Menus and menu commands• arguments Provides arguments for Dreamweaver to pass to the code in the JavaScript file that you
145EXTENDING DREAMWEAVER CS4Menus and menu commandsAttributes{app}app The name of the application in which the separator is shown. Not currently use
146EXTENDING DREAMWEAVER CS4Menus and menu commandsAttributeskey, {app}, {platform}, {file}, {arguments}, {command}, id, {name}• key The key combinat
147EXTENDING DREAMWEAVER CS4Menus and menu commandsExample <tool name="Hand tool" id="com.Macromedia.dreamweaver.tools.hand">
148EXTENDING DREAMWEAVER CS4Menus and menu commandsExample <activate name="Switch to Hand tool" key="H" id="DWTools_Hand_A
149EXTENDING DREAMWEAVER CS4Menus and menu commandsCreate a submenu while moving a menu command1 Place the insertion point inside a menu (somewhere be
150EXTENDING DREAMWEAVER CS4Menus and menu commandsIf you reassign a keyboard shortcut, change it on a printed copy of the matrix for future reference
151EXTENDING DREAMWEAVER CS4Menus and menu commandsMenu commandsMenu commands make menus more flexible and dynamic. Menu commands can perform almost a
152EXTENDING DREAMWEAVER CS4Menus and menu commandsDelete a command you’ve created1 Select Commands > Edit Command List.A dialog box appears, listi
153EXTENDING DREAMWEAVER CS4Menus and menu commands12 The dialog box remains visible until one of the scripts in the menu commands file calls the wind
10EXTENDING DREAMWEAVER CS4Customizing Dreamweaver• Deselect the Never Rewrite Code: In Files With Extensions option. (Deselecting this option lets Dr
154EXTENDING DREAMWEAVER CS4Menus and menu commands function canAcceptCommand() { var selarray; if (arguments.length != 1) return false; var bResu
155EXTENDING DREAMWEAVER CS4Menus and menu commands function receiveArguments(){ if (arguments.length != 2) return; var whatToDo = arguments[0];
156EXTENDING DREAMWEAVER CS4Menus and menu commandsA dynamic menu exampleThis example implements the Dreamweaver Preview In Browser submenu that displ
157EXTENDING DREAMWEAVER CS4Menus and menu commands function getDynamicContent(itemID) { var browsers = null; var PIB = null; var i; var j=0; br
158EXTENDING DREAMWEAVER CS4Menus and menu commands function canAcceptCommand() { var PIB = dw.getBrowserList(); if (arguments[0] == 'primar
159EXTENDING DREAMWEAVER CS4Menus and menu commandsbHavePreviewTarget = false; else if (strTemp.indexOf("/") == -1) bHavePreviewTarget = f
160EXTENDING DREAMWEAVER CS4Menus and menu commandsreceiveArguments()Dreamweaver calls the receiveArguments() function to let the command process any
161EXTENDING DREAMWEAVER CS4Menus and menu commands} else { // Otherwise, F12 or Ctrl+F12 was pressed, ask if the user wants // to specify a prima
162EXTENDING DREAMWEAVER CS4Menus and menu commandscanAcceptCommand()DescriptionDetermines whether the menu item is active or dimmed.Arguments{arg1},
163EXTENDING DREAMWEAVER CS4Menus and menu commandsArgumentsmenuIDThe menuIDargument is the value of the id attribute in the menuitem tag that is asso
11EXTENDING DREAMWEAVER CS4Customizing DreamweaverNote: To install extensions that all users can use in a multiuser operating system, you must be logg
164EXTENDING DREAMWEAVER CS4Menus and menu commandsExample function isCommandChecked() { var bChecked = false; var cssStyle = arguments[0]; if (
165EXTENDING DREAMWEAVER CS4Menus and menu commandssetMenuText()DescriptionSpecifies the text that should appear in the menu.Note: Do not use this fun
166EXTENDING DREAMWEAVER CS4Menus and menu commandsExampleThe following example of windowDimensions() sets the dimensions of the Parameters dialog box
167Chapter 11: ToolbarsYou can create a toolbar for Adobe Dreamweaver simply by creating a file that defines the toolbar and placing that file in the
168EXTENDING DREAMWEAVER CS4Toolbars• You can horizontally dock toolbars to the top or bottom of the frame window. • Toolbars remain a fixed size. A t
169EXTENDING DREAMWEAVER CS4ToolbarsA simple toolbar command fileThis simple example implements a Title text box item as seen on the Dreamweaver Docum
170EXTENDING DREAMWEAVER CS4Toolbars function receiveArguments(newTitle) { var dom = dw.getDocumentDOM(); if (dom) dom.setTitle(newTitle); }Dream
171EXTENDING DREAMWEAVER CS4ToolbarsAfter the declarations, the file consists of a single toolbarset tag, which contains any number of the following t
172EXTENDING DREAMWEAVER CS4Toolbars• container="mainframe" or "document" Defaults to "mainframe". Specifies where the t
173EXTENDING DREAMWEAVER CS4Toolbars<include/>DescriptionLoads toolbar items from the specified file before continuing to load the current file.
12EXTENDING DREAMWEAVER CS4Customizing DreamweaverExample <deleteditems> <!-- item tags here --> </deleteditems><item>Descri
174EXTENDING DREAMWEAVER CS4ToolbarsAttributesid, {showIf}• id="id_reference" Required. Must be the ID of an item that was previously define
175EXTENDING DREAMWEAVER CS4ToolbarsToolbar item tagsEach type of toolbar item has its own tag and set of required and optional attributes. You can de
176EXTENDING DREAMWEAVER CS4ToolbarsFor a description of each attribute, see “Item tag attributes” on page 180.ContentsNone.ContainerThe toolbar tag
177EXTENDING DREAMWEAVER CS4ToolbarsExample <RADIOBUTTON ID="DW_CodeView" image="Toolbars/images/MM/codeView.gif" disabledIma
178EXTENDING DREAMWEAVER CS4ToolbarsAttributes id, tooltip, file, enabled, checked, value, command, {showIf}, {label}, {width}, {domRequired}, {update
179EXTENDING DREAMWEAVER CS4Toolbars<editcontrol>DescriptionAn edit control box is a text-editing box that executes its command when the user ch
180EXTENDING DREAMWEAVER CS4ToolbarsExample <colorpicker id="Color_Example" image="Toolbars/images/colorpickerIcon.gif" disab
181EXTENDING DREAMWEAVER CS4ToolbarsExample image="Toolbars/images/MM/codenav.gif"disabledImage="image_path"Optional. Dreamweaver
182EXTENDING DREAMWEAVER CS4ToolbarsmenuID="menu_id"This attribute is required for menu buttons and combo buttons, unless you specify the ge
183EXTENDING DREAMWEAVER CS4Toolbarschecked="script"This attribute is required for check buttons and radio buttons. Dreamweaver ignores the
13EXTENDING DREAMWEAVER CS4Customizing Dreamweaver HTML DmWr TEXT ASCIIIn both the FTPExtensionMap.txt file and FTPExtensionMapMac.txt file (Macintosh
184EXTENDING DREAMWEAVER CS4Toolbars• onEveryIdle executes regularly when the application is idle. This can be time-consuming because the enabler/chec
185EXTENDING DREAMWEAVER CS4Toolbars <button id="DW_Undo" image="Toolbars/images/MM/undo.gif" disabledImage="Toolbars/
186EXTENDING DREAMWEAVER CS4ToolbarsExample function canAcceptCommand() { return (dw.getDocumentDOM() != null); }getCurrentValue()AvailabilityDream
187EXTENDING DREAMWEAVER CS4ToolbarsThe name getDynamicContent() is a misnomer because this function should be used even if the list of entries in the
188EXTENDING DREAMWEAVER CS4ToolbarsReturnsDreamweaver expects a string that contains a menu ID, which is defined in the menus.xml file.Example functi
189EXTENDING DREAMWEAVER CS4ToolbarsArgumentsNone.ReturnsDreamweaver expects a string that contains a comma-separated list of update handlers. For a c
190EXTENDING DREAMWEAVER CS4Toolbars function isCommandChecked() { var bChecked = false; var style = arguments[0]; var textFormat = dw.getDocument
191EXTENDING DREAMWEAVER CS4ToolbarsreceiveArguments()AvailabilityDreamweaver MX.DescriptionProcesses any arguments that pass from a toolbar item. The
192EXTENDING DREAMWEAVER CS4ToolbarsExample function showif() { var retval = false; var dom = dw.getDocumentDOM(); if(dom) { var view = dom.ge
193Chapter 12: ReportsAdobe Dreamweaver supports two types of reports: site reports and stand-alone reports.Site reportsYou use the reports API to cre
Copyright© 2008 Adobe Systems Incorporated. All rights reserved.Extending Adobe® Dreamweaver® CS4 for Windows® and Mac OSIf this guide is distributed
14EXTENDING DREAMWEAVER CS4Customizing DreamweaverIf you need to create a new document type, you can either add your entry to the document definition
194EXTENDING DREAMWEAVER CS4ReportsAt this point, Dreamweaver clears all items from the Site Reports tab of the Results panel. Dreamweaver calls the b
195EXTENDING DREAMWEAVER CS4ReportsWrite the JavaScript codeDreamweaver includes the Reports.js file. You can call any of the functions in Reports.js.
196EXTENDING DREAMWEAVER CS4ReportsHow stand-alone reports work1 The custom command, which is the command you create to generate the report, opens a n
197EXTENDING DREAMWEAVER CS4Reports <html> <head> <title>Standalone report example</title> <script src="Listimages.
198EXTENDING DREAMWEAVER CS4Reports function stdaloneresultwin() { var curDOM = dw.getDocumentDOM("document"); var tagList = curDOM.getEl
199EXTENDING DREAMWEAVER CS4ReportsArgumentsstrFilePathThe strFilePath argument is the full path and filename of the file to process.ReturnsDreamweave
200EXTENDING DREAMWEAVER CS4ReportsDescriptionDefines the buttons that should appear on the right side of the Options dialog box and their behavior wh
201EXTENDING DREAMWEAVER CS4ReportsArgumentsplatformThe value of the platform argument is either "macintosh" or "windows", dependi
202Chapter 13: Tag libraries and editorsDreamweaver stores information about each tag, including all tag attributes, in a set of subfolders that resid
203EXTENDING DREAMWEAVER CS4Tag libraries and editorsTag library file formatA tag library consists of a single root file, the TagLibraries.vtm file th
15EXTENDING DREAMWEAVER CS4Customizing Dreamweaver <?xml version="1.0" encoding="utf-8"?> <documenttypes xmlns:MMStr
204EXTENDING DREAMWEAVER CS4Tag libraries and editorsThe taglibrary tag groups one or more tags into a tag library. When you import tags or create a n
205EXTENDING DREAMWEAVER CS4Tag libraries and editorsTo define tags, Dreamweaver uses a modified version of the VTML file format. The following exampl
206EXTENDING DREAMWEAVER CS4Tag libraries and editorsNote: In versions before Dreamweaver MX, tag information is stored in the Configuration/TagAttrib
207EXTENDING DREAMWEAVER CS4Tag libraries and editors <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
208EXTENDING DREAMWEAVER CS4Tag libraries and editorsA simple example of creating a new tag editorThe examples in this section use cfweather, a hypoth
209EXTENDING DREAMWEAVER CS4Tag libraries and editorsIf Dreamweaver cannot find the TagLibraries.vtm file in the user Configuration folder, it searche
210EXTENDING DREAMWEAVER CS4Tag libraries and editors <!DOCTYPE HTML SYSTEM "-//Adobe//DWExtension layout-engine 10.0//dialog"> <h
211EXTENDING DREAMWEAVER CS4Tag libraries and editors<table border="0" cellspacing="4"> <tr> <td valign="bas
212EXTENDING DREAMWEAVER CS4Tag libraries and editorsThe tag editor API functionsIn order to create a new tag editor, you must provide an implementati
213EXTENDING DREAMWEAVER CS4Tag libraries and editorsReturnsDreamweaver expects a Boolean value: true if the input for HTML form elements is valid; fa
16EXTENDING DREAMWEAVER CS4Customizing Dreamweaver internaltype Yes A broad classification of how Dreamweaver treats a file. The internaltype identif
214Chapter 14: Property inspectorsThe Property inspector is perhaps the most familiar floating panel in the interface. The Property inspector is indis
215EXTENDING DREAMWEAVER CS4Property inspectors• The serverModel element (optional) indicates the server model of the Property inspector. The server m
216EXTENDING DREAMWEAVER CS4Property inspectorsA simple Property inspector exampleThe following Property inspector inspects the marquee tag, which is
217EXTENDING DREAMWEAVER CS4Property inspectors <!-- Specify the image that will appear in the Property inspector --> <SPAN ID="image&q
218EXTENDING DREAMWEAVER CS4Property inspectors function inspectSelection(){ // Get the DOM of the current document. var theDOM = dw.getDocumentDOM(
219EXTENDING DREAMWEAVER CS4Property inspectorsCreate the imageYou can optionally create the image that appears in the Property inspector.1 Create an
220EXTENDING DREAMWEAVER CS4Property inspectors function canInspectSelection(){3 var theDOM = dw.getDocumentDOM(); var theObj = theDOM.getSelectedNo
221EXTENDING DREAMWEAVER CS4Property inspectors function inspectSelection(){ var dom = dreamweaver.getDocumentDOM(); var theObj = dom.getSelectedNod
222Chapter 15: Floating panelsYou can create floating panels or inspectors without the size and layout limitations of Property inspectors. A custom Pr
223EXTENDING DREAMWEAVER CS4Floating panelsWhen one of the files inside the Configuration folder calls the dw.getFloaterVisibility(floaterName), dw.se
17EXTENDING DREAMWEAVER CS4Customizing DreamweaverNote: When the user saves a new document, Dreamweaver examines the list of extensions for the curren
224EXTENDING DREAMWEAVER CS4Floating panels <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>
225EXTENDING DREAMWEAVER CS4Floating panelsselectionChanged(): is a script marker selected?The selectionChanged() function determines whether a script
226EXTENDING DREAMWEAVER CS4Floating panels2 Enter the following code in the header section of the file. function selectionChanged(){ /* get the sele
227EXTENDING DREAMWEAVER CS4Floating panelsCreating a menu itemIt is not sufficient to save the Script Editor code in the Configuration/Floaters folde
228EXTENDING DREAMWEAVER CS4Floating panelsExample // the following instance of displayHelp() opens // in a browser a file that explains how to use
229EXTENDING DREAMWEAVER CS4Floating panelsArgumentsNone.ReturnsDreamweaver expects a string containing the words "left", "right",
230EXTENDING DREAMWEAVER CS4Floating panelsReturnsDreamweaver expects a string of the form "floaterName1,floaterName2,...floaterNameN".Examp
231EXTENDING DREAMWEAVER CS4Floating panelsisResizable()AvailabilityDreamweaver 4. DescriptionDetermines whether a user can resize a floating panel. I
232EXTENDING DREAMWEAVER CS4Floating panels function selectionChanged(){ /* get the selected node */ var theDOM = dw.getDocumentDOM(); var theNode
233EXTENDING DREAMWEAVER CS4Floating panels /* create a flag that specifies whether an edit is being processed, and set it to false.*/ document.runni
18EXTENDING DREAMWEAVER CS4Customizing DreamweaverDefining dynamic templatesYou can create templates that are based on dynamic document types. These t
234Chapter 16: BehaviorsThe term behavior refers to the combination of an event and an action. onClick, onLoad, and onSubmit are examples of events. C
235EXTENDING DREAMWEAVER CS4Behaviors4 Dreamweaver displays a dialog box that contains the BODY elements of the Action file. If the Action file’s body
236EXTENDING DREAMWEAVER CS4BehaviorsCreate the behavior extensionThe following code presents a relatively simple example. The code checks the brand o
237EXTENDING DREAMWEAVER CS4Behaviorsvar ieURL = unescape(argArray[2]); document.theForm.nsURL.value = nsURL; document.theForm.ieURL.value = ieURL;
238EXTENDING DREAMWEAVER CS4BehaviorsCreate the HTML files to browse (deprecated)Create the HTML files to browse, the file to go to if the browser is
239EXTENDING DREAMWEAVER CS4Behaviors10 Click OK.Dreamweaver adds the specified JavaScript to the whichbrowser.htm file, so that the file appears as f
240EXTENDING DREAMWEAVER CS4BehaviorsThe argument is a unique identifier among all instances of all behaviors in the user’s document. Its format is fu
241EXTENDING DREAMWEAVER CS4BehaviorsReturnsDreamweaver expects either a string that contains the JavaScript functions or a string that contains the n
242EXTENDING DREAMWEAVER CS4BehaviorsExampleThe following instance of the canAcceptBehavior() function returns a list of preferred events for the beha
243EXTENDING DREAMWEAVER CS4BehaviorsReturnsDreamweaver expects nothing.identifyBehaviorArguments()DescriptionThis function identifies arguments from
19EXTENDING DREAMWEAVER CS4Customizing Dreamweaverhard disk:\Users\username\AppData\Roaming\Adobe\Dreamweaver CS4\ConfigurationMac OS X platform uses
244EXTENDING DREAMWEAVER CS4Behaviors function identifyBehaviorArguments(fnCallStr) { var listOfArgTypes; var itemArray = dreamweaver.getTokens(fnCa
245EXTENDING DREAMWEAVER CS4BehaviorsExampleThe following instance of the inspectBehavior() function, taken from the Display Status Message.htm file,
246Chapter 17: Server behaviorsAdobe® Dreamweaver® provides users with an interface for adding server behaviors into their documents to perform server
247EXTENDING DREAMWEAVER CS4Server behaviorsDreamweaver architectureWhen you use the Server Behavior Builder to create a Dreamweaver-specific extensio
248EXTENDING DREAMWEAVER CS4Server behaviors <participant> <quickSearch><![CDATA[MM_paramName]]></quickSearch> <insertTex
249EXTENDING DREAMWEAVER CS4Server behaviorsDefining the new server behaviorNote: If the Server Behaviors panel is not open and visible, select the Wi
250EXTENDING DREAMWEAVER CS4Server behaviorsWhen the findServerBehaviors() function creates a behavior object, it usually sets the four properties (in
251EXTENDING DREAMWEAVER CS4Server behaviors• When the user selects a server behavior and uses the Cut or Copy commands, Dreamweaver passes the object
252EXTENDING DREAMWEAVER CS4Server behaviorsobject that belongs to Recordset1 cannot be found, the incomplete property is set to the value true so tha
253EXTENDING DREAMWEAVER CS4Server behaviorsArgumentsserverBehaviorThe serverBehavior JavaScript object represents the behavior; it is necessary to mo
20EXTENDING DREAMWEAVER CS4Customizing DreamweaverProviding localized stringsWithin a document type definition file, the <title> and <descrip
254EXTENDING DREAMWEAVER CS4Server behaviorsArgumentsserverBehavior• The serverBehavior JavaScript object represents the behavior.ReturnsDreamweaver e
255EXTENDING DREAMWEAVER CS4Server behaviorsReturnsDreamweaver expects an array of JavaScript objects; the length of the array is equal to the number
256EXTENDING DREAMWEAVER CS4Server behaviorsReturnsDreamweaver expects a Boolean value: true if the behavior pastes successfully from the Clipboard; f
257EXTENDING DREAMWEAVER CS4Server behaviorsArgumentsparamObj, sbObj• The paramObj argument is the object that contains the user settings. • The sbObj
258EXTENDING DREAMWEAVER CS4Server behaviorsEDML filesYou must maintain Dreamweaver coding conventions when you edit a file. Pay attention to the depe
259EXTENDING DREAMWEAVER CS4Server behaviorsEDML structureYou should use a unique filename to identify your server behavior group. If only one group f
260EXTENDING DREAMWEAVER CS4Server behaviorsRequiredYes.<group> attributesThe following items are valid attributes of the group tag.versionDescr
261EXTENDING DREAMWEAVER CS4Server behaviorsdataSourceDescriptionThis advanced feature supports new data sources that can be added to Dreamweaver.Mult
262EXTENDING DREAMWEAVER CS4Server behaviorsRequiredNo.ValueThe value is a unique string that determines which group to apply, as shown in the followi
263EXTENDING DREAMWEAVER CS4Server behaviorsTypeBlock tag.RequiredYes.<groupParticipants> attributesThe following items are valid attributes of
21EXTENDING DREAMWEAVER CS4Customizing DreamweaverDreamweaver does not let document types that are not associated with a server model share file exten
264EXTENDING DREAMWEAVER CS4Server behaviors<groupParticipant> attributesThe following items are valid attributes of the groupParticipant tag.na
265EXTENDING DREAMWEAVER CS4Server behaviors• The multiple value indicates that the participant is optional and multiple copies of it can be associate
266EXTENDING DREAMWEAVER CS4Server behaviorsTypeAttribute.RequiredNo.<quickSearch> DescriptionThis tag is a simple search string that is used fo
267EXTENDING DREAMWEAVER CS4Server behaviorsRequiredNo.ValueThe value is the text to insert in the document. If any parts of the text need customizing
268EXTENDING DREAMWEAVER CS4Server behaviors• The belowHTML[+weight] value is similar to the aboveHTML value, except that participants are added below
269EXTENDING DREAMWEAVER CS4Server behaviorsRequiredThis attribute is required only if the insert location contains the word node.ValueThe tagtype_Tag
270EXTENDING DREAMWEAVER CS4Server behaviorsParentsearchPatternsTypeAttribute.RequiredYes.Valuesdirective, tag+tagName, tag+*, comment, text• The dire
271EXTENDING DREAMWEAVER CS4Server behaviorsParentsearchPatternsTypeBlock tag.RequiredYes.ValuessearchString, /regularExpression/, <empty>• The
272EXTENDING DREAMWEAVER CS4Server behaviorsparamNamesDescriptionThis attribute is a comma-separated list of parameter names whose values are being ex
273EXTENDING DREAMWEAVER CS4Server behaviorsValuesall, attribute+attribName, tagOnly, innerOnly• The all value (default) searches the entire tag that
22EXTENDING DREAMWEAVER CS4Customizing DreamweaverContainerNone.Example <panelset> <!-- panelset tags here --> </panelset><appl
274EXTENDING DREAMWEAVER CS4Server behaviorsThe search patterns must identify the participant and extract several parameters. However, if a parameter
275EXTENDING DREAMWEAVER CS4Server behaviorsValuesThe value is a regular expression that finds a parameter between two parenthetical subexpressions, i
276EXTENDING DREAMWEAVER CS4Server behaviorsparamNameDescriptionThis attribute indicates the name of the parameter whose value is used to update the p
277EXTENDING DREAMWEAVER CS4Server behaviorsParentdeleteTypeAttribute.RequiredNo.Valuesall, none, tagOnly, innerOnly, attribute+attribName, attribute+
278EXTENDING DREAMWEAVER CS4Server behaviors<searchPatterns>DescriptionThis tag lets Dreamweaver find each specified instance in a document. If
279EXTENDING DREAMWEAVER CS4Server behaviors<translation> attributesThe following items are valid attributes of the translation tag.whereToSearc
280EXTENDING DREAMWEAVER CS4Server behaviorsRequiredYes.Valuesdynamic data, dynamic image, dynamic source, tabbed region start, tabbed region end, cus
281EXTENDING DREAMWEAVER CS4Server behaviorsRequiredNo.ValuesThe tagName value is a valid tag name. It should be unique to prevent conflicts with know
282EXTENDING DREAMWEAVER CS4Server behaviors <attribute> mmTranslatedValueDynValue="VALUE={@@rs@@.@@col@@}" </attribute><di
283EXTENDING DREAMWEAVER CS4Server behaviorsServer behavior techniquesThis section covers the common and advanced techniques that create and edit serv
23EXTENDING DREAMWEAVER CS4Customizing DreamweaverContainerThis tag must be contained in a panelset tag.Example <panelset> <document rect=&q
284EXTENDING DREAMWEAVER CS4Server behaviorsOptional search patternsSometimes you want to identify a participant even if some parameters are not found
285EXTENDING DREAMWEAVER CS4Server behaviors <% //test_p1 %> <% //test_p2 %> <html>These participants are found and matched, and T
286EXTENDING DREAMWEAVER CS4Server behaviors <% total = Recordset1.Fields.Item("itemPrice").Value * 1.0825 %> <% total = Recordset
287EXTENDING DREAMWEAVER CS4Server behaviors <searchPatterns whereToSearch="tag+cfinclude"> <searchPattern paramNames="includ
288EXTENDING DREAMWEAVER CS4Server behaviors <quickSearch>Response.Write</quickSearch> <searchPatterns whereToSearch="directive&q
289EXTENDING DREAMWEAVER CS4Server behaviorsAnother approach is to remove the entire tag; typing <delete deleteType="tagOnly"/> delete
290Chapter 18: Data sourcesData source files are stored in the Configuration/DataSources/ServerModelName folder. Dreamweaver currently supports the fo
291EXTENDING DREAMWEAVER CS4Data sources3 Dreamweaver goes through each file in the appropriate server model folder, calling the findDynamicSources()
292EXTENDING DREAMWEAVER CS4Data sourcesA simple data source exampleThis extension adds a custom data source to the Bindings panel for Adobe ColdFusio
293EXTENDING DREAMWEAVER CS4Data sourcesFor the MyDatasource Variable, you want Dreamweaver to insert the ColdFusion code <cfoutput>#MyXML.varia
iiiContentsChapter 1: IntroductionAbout extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24EXTENDING DREAMWEAVER CS4Customizing Dreamweaver<panelcontainer>DescriptionDescribes an entire panel group.Attributesexpanded, title,{ height,
294EXTENDING DREAMWEAVER CS4Data sources{ alert(MM.MSG_DefineMyDatasource); } } } function findDynamicSources() { var retList = new Array();
295EXTENDING DREAMWEAVER CS4Data sourcesvar paramObj = new Object(); paramObj.bindingName = bindingName; var retStr = extPart.getInsertString("
296EXTENDING DREAMWEAVER CS4Data sourcesTo provide a dialog box for the user, create a set of command files: a command definition file in HTML and a c
297EXTENDING DREAMWEAVER CS4Data sources //******************* API ********************** function commandButtons(){ return new Array(MM.BTN_OK,&q
298EXTENDING DREAMWEAVER CS4Data sources4 Drag the variable to your document, and Dreamweaver inserts the appropriate code from the EDML file:The data
299EXTENDING DREAMWEAVER CS4Data sourcesFor example, in Dreamweaver, if the selection is a recordset or command, the deleteDynamicSource() function ca
300EXTENDING DREAMWEAVER CS4Data sourcesArgumentssourceName, bindingName• The sourceName argument is the name of the top-level node to which the child
301EXTENDING DREAMWEAVER CS4Data sourcesgenerateDynamicDataRef()AvailabilityDreamweaver UltraDev 1.DescriptionThis function generates the dynamic data
302EXTENDING DREAMWEAVER CS4Data sources• The name property is the name of the server behavior that is associated with the data source, if one exists.
303Chapter 19: Server formats“Data sources” on page 290 discusses how Adobe Dreamweaver inserts dynamic data into a user document by adding a server
25EXTENDING DREAMWEAVER CS4Customizing DreamweaverAttributesid, visibleTab• id is a number that indicates the ID for the panel. The following table co
304EXTENDING DREAMWEAVER CS4Server formats• The expression=regexp attribute is a regular expression that matches the dynamic data objects that use thi
305EXTENDING DREAMWEAVER CS4Server formatsScenarios in which the data formatting functions are calledThe data formatting functions are called in the f
306EXTENDING DREAMWEAVER CS4Server formatsThe applyFormat() function should use the DOM to add function declarations to the top of the user’s document
307EXTENDING DREAMWEAVER CS4Server formatsUse the DOM with the deleteFormat() function to remove the function declaration from the top of the current
308EXTENDING DREAMWEAVER CS4Server formatsDescriptionInitializes form controls when a user edits a format in the Edit Format List dialog box. Argument
309Chapter 20: ComponentsAdobe Dreamweaver supports the creation of many of the most popular types of components. In addition, Dreamweaver lets you ex
310EXTENDING DREAMWEAVER CS4ComponentsIn some cases, writing some JavaScript code that calls certain component-related function, is a must for alterin
311EXTENDING DREAMWEAVER CS4ComponentsNote: Keep the same prefix throughout all the files that correspond to one component so that each file and its c
312EXTENDING DREAMWEAVER CS4ComponentsFor example, the following WebServicesClass node has web methods as its children: this.name = "TrafficLocat
313EXTENDING DREAMWEAVER CS4ComponentsgetContextMenuId()AvailabilityDreamweaver MX.Description Returns the context menu ID for the component type. Eve
26EXTENDING DREAMWEAVER CS4Customizing DreamweaverExample <panelset> <panelframe rect="196 453 661 987" visible="true" d
314EXTENDING DREAMWEAVER CS4Components <menubar xmlns:MMString="http://www.macromedia.com/schemes/dat/string/" name="" id="
315EXTENDING DREAMWEAVER CS4Components function getCodeVi e wDropCode(compone nt Rec ) { var codeToDrop=""; if (componentRec) {
316EXTENDING DREAMWEAVER CS4Components• An "Event:CreateSite" handler opens a dialog box to create a new site.• An "Event:SetDocType&qu
317EXTENDING DREAMWEAVER CS4ComponentsDescriptionDreamweaver calls this function before the Components tab appears. Dreamweaver then calls the getSetu
318EXTENDING DREAMWEAVER CS4Components function handleDesignViewDrop(componentRec) { var bHandled = false; if (componentRec) { if ((componentRec.
319EXTENDING DREAMWEAVER CS4Components function handleDoubleClick(componentRec) { var selectedObj = dw.serverComponentsPalette.getSelectedNode(); i
320EXTENDING DREAMWEAVER CS4ComponentsArgumentsNone.ReturnsAn array of toolbar buttons in left-to-right order.ExampleThe following example assigns pro
321EXTENDING DREAMWEAVER CS4ComponentsplusButton.pressedImage = PLUSDROPBUTTONDOWN; plusButton.disabledImage = PLUSDROPBUTTONUP; plusButton.toolS
322Chapter 21: Server modelsServer models are the technologies that run scripts on a server. When users define a new site, they can identify the serve
323EXTENDING DREAMWEAVER CS4Server modelsArgumentsdomThe dom argument is the Adobe document object, which is returned by the dreamweaver.getDocumentDO
27EXTENDING DREAMWEAVER CS4Customizing DreamweaverChanging keyboard shortcut mappingsDreamweaver includes many keyboard shortcuts to Dreamweaver featu
324EXTENDING DREAMWEAVER CS4Server modelsDescriptionThis function returns an object that describes the method and array signatures that the scripting
325EXTENDING DREAMWEAVER CS4Server modelsDescriptionThis function returns a JavaScript object that can be accessed from within the JavaScript code. Yo
326EXTENDING DREAMWEAVER CS4Server modelsReturnsDreamweaver expects an array of strings that represent the supported scripting languages. getServerMod
327EXTENDING DREAMWEAVER CS4Server modelsDescriptionThis function returns the name that should appear in the user interface for this server model. You
328EXTENDING DREAMWEAVER CS4Server modelsgetVersionArray() AvailabilityDreamweaver UltraDev 1, deprecated in Dreamweaver MX.DescriptionThis function r
329Chapter 22: Data translatorsData translators translate specialized markups into code that Adobe Dreamweaver can read and display. Server-side inclu
330EXTENDING DREAMWEAVER CS4Data translators• Selects Modify > Convert > Convert Tables To AP Divs• Selects Modify > Convert > Convert AP
331EXTENDING DREAMWEAVER CS4Data translatorsTranslating more than one attribute at a timeThe mmTranslatedValue attribute can contain more than one val
332EXTENDING DREAMWEAVER CS4Data translators <MM:BeginLock translatorClass="translatorClass" ¬ type="tagNameOrType" depFiles=&
333EXTENDING DREAMWEAVER CS4Data translators <script language="javascript"> <!-- function foo() { alert('<bean:message k
28EXTENDING DREAMWEAVER CS4Customizing DreamweaverCreate a keyboard mappings file1 Make a copy of one of the keyboard mappings files in the Configurat
334EXTENDING DREAMWEAVER CS4Data translators if (theSelection.nodeType == node.ELEMENT_NODE && ¬ theSelection.getAttribute('type')
335EXTENDING DREAMWEAVER CS4Data translators // Assemble the new include comment. radioStr and URL are // variables defined earlier in the code. new
336EXTENDING DREAMWEAVER CS4Data translators5 Restart Dreamweaver, and select your translator command from the Commands menu. When you click OK, the t
337EXTENDING DREAMWEAVER CS4Data translators <html> <head> <title>Conditional Translator</title> <meta http-equiv="
338EXTENDING DREAMWEAVER CS4Data translatorsend = outStr.indexOf(' #>',start); equalSign = outStr.indexOf('="<# if',ba
339EXTENDING DREAMWEAVER CS4Data translatorsstart = outStr.indexOf('<# if',end); } // Return the translated string. return outStr }
340EXTENDING DREAMWEAVER CS4Data translators <html> <head> <title>Kent Tag Translator</title> <meta http-equiv="Con
341EXTENDING DREAMWEAVER CS4Data translators // locking tags. For more information on the repacement operation, see // the comments in the replaceKe
342EXTENDING DREAMWEAVER CS4Data translatorsvar hour = today.getUTCHours(); // The current hour in GMT, based on the
343EXTENDING DREAMWEAVER CS4Data translators}else{ imageRef = "images/kent_hardAtWorkOnWin.jpg"; } }else{ imageRef = "images/kent
29EXTENDING DREAMWEAVER CS4Customizing Dreamweaver <shortcutset language="French"> <shortcut key="Cmd+[" newkey="Cm
344EXTENDING DREAMWEAVER CS4Data translators6 The regExps string specifies a regular expression that you can check. The array should contain the same
345EXTENDING DREAMWEAVER CS4Data translatorsDescriptionDreamweaver performs two translation passes. The first pass goes through all the translators an
346EXTENDING DREAMWEAVER CS4Data translators function translateMarkup(docName, siteRoot, docContent){ var translatedString = ""; if (docCo
347Chapter 23: C-level extensibility The C-level extensibility mechanism lets you implement Adobe Dreamweaver extensibility files using a combination
348EXTENDING DREAMWEAVER CS4C-level extensibility JSBool readContentsOfFile(JSContext *cx, JSObject *obj, unsigned int ¬ argc, jsval *argv, jsval *r
349EXTENDING DREAMWEAVER CS4C-level extensibilityNote: The library can be implemented in either C or C++, but the file that contains the MM_Init() fun
350EXTENDING DREAMWEAVER CS4C-level extensibilitytypedef JSBool (*JSNative)(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval)
351EXTENDING DREAMWEAVER CS4C-level extensibilityArgumentsJSContext *cx, JSVal v, unsigned integer *pLength• The *cx argument is the opaque JSContext
352EXTENDING DREAMWEAVER CS4C-level extensibilityJSBool JS_ValueToBoolean()DescriptionThis function extracts a function argument from a JSVal structur
353EXTENDING DREAMWEAVER CS4C-level extensibility• The *pLengthargument is a pointer to an unsigned integer. This function sets *pLength equal to the
30Chapter 3: Customizing Code viewAdobe Dreamweaver uses two devices in Code view that help you enter code quickly and make your code readable and acc
354EXTENDING DREAMWEAVER CS4C-level extensibilityNote: The JS_UCStringToValue() method is like the JSBool JS_StringToValue() in every way, except tha
355EXTENDING DREAMWEAVER CS4C-level extensibilityJSVal JS_ObjectToValue()DescriptionThis function stores an object return value in a JSVal. Use JS_ Ne
356EXTENDING DREAMWEAVER CS4C-level extensibilitylong JS_GetArrayLength()DescriptionGiven a pointer to an array object, this function gets the number
357EXTENDING DREAMWEAVER CS4C-level extensibilityReturnsA Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.JSBool JS_ExecuteScript
358EXTENDING DREAMWEAVER CS4C-level extensibilityFile access and multiuser configuration APIAdobe recommends that you always use the file access and m
359EXTENDING DREAMWEAVER CS4C-level extensibilityNote: Most JavaScript extensions need not be changed to write to the user Configuration folder. Only
360EXTENDING DREAMWEAVER CS4C-level extensibilityReturnsJSObject is an array that contains the list of files or folders in either the user Configurati
361EXTENDING DREAMWEAVER CS4C-level extensibilityNote: If you want to read the file before writing to it, open the file in "read" mode. When
362EXTENDING DREAMWEAVER CS4C-level extensibility• The unsigned long *modtime argument is the address of an integer in which the function returns the
363EXTENDING DREAMWEAVER CS4C-level extensibilityExample char *dwConfig = "file:///c|/Program Files/Adobe/Adobe Dreamweaver CS3/ Configuration/
31EXTENDING DREAMWEAVER CS4Customizing Code view• The description for each menu group The description appears in the Preferences dialog box for the co
364EXTENDING DREAMWEAVER CS4C-level extensibilityReturnsA Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.Example char *dwConfig
365EXTENDING DREAMWEAVER CS4C-level extensibility• The Sample.c example file defines the computeSum() function.• The Sample.mak make file lets you bui
366EXTENDING DREAMWEAVER CS4C-level extensibility function objectTag() { // Return the html tag that should be inserted alert(Sample.computeSum(2,2)
367Chapter 24: The Shared folderThe Shared folder is the central repository for utility functions, classes, and images that are commonly used by all e
368EXTENDING DREAMWEAVER CS4The Shared folderThe MM folderThe MM folder contains the shared scripts, images, and classes used by the extensions that c
369EXTENDING DREAMWEAVER CS4The Shared folderThe Scripts subfolderThe Scripts subfolder contains the following utility functions:The Scripts folder al
370EXTENDING DREAMWEAVER CS4The Shared folderThe CMN folderThe CMN folder contains the following utility functions:File DescriptionclassCheckbox.js He
371EXTENDING DREAMWEAVER CS4The Shared folderOther foldersThe following list describes other folders of interest in the Shared folder:Controls The C
372EXTENDING DREAMWEAVER CS4The Shared folderUsing the Shared folder Look first in the Dreamweaver Configuration/Shared/Common folder for useful exten
373IndexAaction files 234action tag 147activate tag 147addDynamicSource() 298alert() 96analyzeServerBehavior() 251APIs, types ofbehaviors 239C-
32EXTENDING DREAMWEAVER CS4Customizing Code viewThe <method> tag and its attributes are similar to the function tag and its attributes, but the
374EXTENDING DREAMWEAVER CS4IndexcanInsertObject() 120canRecognizeDocument() 322category tag 106changing default file type 5charEnd tag, code color
375EXTENDING DREAMWEAVER CS4IndexComponents panelextending 309files 310tree control 311Components panel API functionsgetCodeViewDropCode() 314getC
376EXTENDING DREAMWEAVER CS4Indexdynamic menussample code 156user experience 152dynamic templates 18Dynamic Text dialog box 290Eeditmenu items 14
377EXTENDING DREAMWEAVER CS4Indexperformance issues 232user experience 222focus() 96folders and files server behavior 247form object 96formatDynam
378EXTENDING DREAMWEAVER CS4IndexJS_BooleanToValue() 354JS_DefineFunction() 350JS_DoubleToValue() 354JS_ExecuteScript() 357JS_GetArrayLength() 356
379EXTENDING DREAMWEAVER CS4Indexof tag objects 101of text objects 102number object 96numbers tag, code coloring 54Oobject object 96objectsadding
380EXTENDING DREAMWEAVER CS4Indexseparator tag 108, 144, 174server behaviordeleting 288dwscripts functions 256example 248extensions, about 76findi
381EXTENDING DREAMWEAVER CS4Indexdocking 168dropdown tag 177editcontrol tag 179file definition 170include/ tag 173item tags 175itemref/ tag 173i
33EXTENDING DREAMWEAVER CS4Customizing Code view<method pattern="openFirstPanel()" icon= ".../hintMisc.gif" /> ... ...
ivEXTENDING DREAMWEAVER CS4ContentsChapter 7: Insert bar objectsHow object files work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34EXTENDING DREAMWEAVER CS4Customizing Code viewSpry attribute grouping formatThe following code shows the format of the .vtm file. This format allows
35EXTENDING DREAMWEAVER CS4Customizing Code viewExample <crosstag_attributes> <attribgroup id="spryRegionAttrs" name="Spry1.
36EXTENDING DREAMWEAVER CS4Customizing Code viewExample <codehints><menugroup>DescriptionEach menugroup tag corresponds to a type of menu
37EXTENDING DREAMWEAVER CS4Customizing Code viewContainerThe menugroup tag.Example <description> <![CDATA[ To add or remove tags and attribu
38EXTENDING DREAMWEAVER CS4Customizing Code view<menuitem>DescriptionThis tag specifies the text for an item in a code hints pop-up menu. The me
39EXTENDING DREAMWEAVER CS4Customizing Code viewFor object methods, when you type the object name, Dreamweaver opens a menu of the methods that are de
40EXTENDING DREAMWEAVER CS4Customizing Code viewAttributespattern, icon, object, source, constructor, static, retType• The pattern attribute specifies
41EXTENDING DREAMWEAVER CS4Customizing Code view• optionArray, which indicates a list of nested <optionparammenu> and <parammenuitem> to d
42EXTENDING DREAMWEAVER CS4Customizing Code view• The value attribute specifies the value of the parameter to insert when the user selects the code hi
43EXTENDING DREAMWEAVER CS4Customizing Code view• The value attribute is the string that Dreamweaver inserts in the document when you select the comma
vEXTENDING DREAMWEAVER CS4ContentsA simple Property inspector example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44EXTENDING DREAMWEAVER CS4Customizing Code viewAbout code coloringDreamweaver lets you customize or extend the code coloring schemes that you see in
45EXTENDING DREAMWEAVER CS4Customizing Code viewThe following excerpt from the CodeColoring.xml file illustrates the hierarchy of tags in a code color
46EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesname, id, priority, {doctypes}• name="scheme_name" A string that assigns a name to
47EXTENDING DREAMWEAVER CS4Customizing Code view<blockStart>DescriptionOptional. Specified only if the coloring scheme can be embedded inside a
48EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesNone.Example <charStart><![CDATA[']]></charStart><charEnd>Descr
49EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesNone.Example <commentEnd><![CDATA[--%>]]></commentEnd><cssImport/>
50EXTENDING DREAMWEAVER CS4Customizing Code viewExample <cssProperty name="Property" id="CodeColor_CSSProperty" /><cssSel
51EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesname, id• name="display_name" A string that Dreamweaver displays in the code colo
52EXTENDING DREAMWEAVER CS4Customizing Code viewExample <entity name="Special Characters" id="CodeColor_HTMLEntity" /><fu
53EXTENDING DREAMWEAVER CS4Customizing Code view<ignoreCase>DescriptionSpecifies whether case should be ignored when comparing tokens to keyword
viEXTENDING DREAMWEAVER CS4ContentsAdding a translated attribute to a tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54EXTENDING DREAMWEAVER CS4Customizing Code view<keyword>DescriptionA string of text that defines a keyword. Multiple keyword tags are allowed.
55EXTENDING DREAMWEAVER CS4Customizing Code view<operators>DescriptionA list of characters to be recognized as operators.Attributesname, id• nam
56EXTENDING DREAMWEAVER CS4Customizing Code viewExample <sampleText doctypes="JavaScript"><![CDATA[/* JavaScript */ function displ
57EXTENDING DREAMWEAVER CS4Customizing Code view<stringEnd>DescriptionContains a text string that represents the delimiter of the end of a code
58EXTENDING DREAMWEAVER CS4Customizing Code viewinnerTextThis value tells Dreamweaver to color the block delimiters the same as the default text of th
59EXTENDING DREAMWEAVER CS4Customizing Code viewExample <blockStart doctypes="PHP_MySQL" scheme="outerTag"> <![CDATA[<
60EXTENDING DREAMWEAVER CS4Customizing Code viewTo make the process of defining schemes more flexible, Dreamweaver lets you specify wildcard and escap
61EXTENDING DREAMWEAVER CS4Customizing Code viewEscape charactersThe following is a list of escape characters that Dreamweaver supports, along with th
62EXTENDING DREAMWEAVER CS4Customizing Code view <!-- #BeginEditable "\*" -->This leaves an editable region name that can be as many a
63EXTENDING DREAMWEAVER CS4Customizing Code viewEditing schemesYou can edit the styles for a code coloring scheme either by editing the code coloring
1Chapter 1: IntroductionThe Extending Dreamweaver CS4 guide describes the Adobe® Dreamweaver® CS4 framework and application programming interface (API
64EXTENDING DREAMWEAVER CS4Customizing Code viewTo edit styles for a scheme using the Code Coloring category in the Preferences dialog box, double-cli
65EXTENDING DREAMWEAVER CS4Customizing Code viewCSS code coloring <scheme name="CSS" id="CSS" doctypes="CSS" priorit
66EXTENDING DREAMWEAVER CS4Customizing Code view <scheme name="JavaScript" id="JavaScript" doctypes="JavaScript" prio
67EXTENDING DREAMWEAVER CS4Customizing Code view</keywords> <keywords id="CodeColor_JavascriptNumber"> <keyword>Infinity
68EXTENDING DREAMWEAVER CS4Customizing Code viewDreamweaver stores browser profiles in the Browser Profile folder inside the Dreamweaver Configuration
69EXTENDING DREAMWEAVER CS4Customizing Code view <property names="foo,bar"> <value type="named" name="top"/>
70EXTENDING DREAMWEAVER CS4Customizing Code view• message="message_string" The message attribute defines a message string that Dreamweaver d
71EXTENDING DREAMWEAVER CS4Customizing Code viewAbout related filesThe related files feature provides users access to the supporting and related files
72EXTENDING DREAMWEAVER CS4Customizing Code viewThe following related files are supported:Related files APIsYou can customize the related files menu t
73EXTENDING DREAMWEAVER CS4Customizing Code viewAbout Live viewThe Live view feature facilitates previewing your web pages as it would appear in a bro
2EXTENDING DREAMWEAVER CS4IntroductionSome extensions need Dreamweaver to restart before you can use them. If you are running Dreamweaver when you ins
74EXTENDING DREAMWEAVER CS4Customizing Code view{ var browser = document.getElementById("browser"); browser.addEventListener("Browser
75Chapter 4: Extending DreamweaverDreamweaver provides an extensive set of tools that you can use to add to or customize its functionality.When you cr
76EXTENDING DREAMWEAVER CS4Extending DreamweaverFloating panel extensions add floating panels to the Dreamweaver user interface. Floating panels can
77EXTENDING DREAMWEAVER CS4Extending DreamweaverConfiguration folders and extensionsThe folders and files that are stored in the Dreamweaver Configura
78EXTENDING DREAMWEAVER CS4Extending DreamweaverMultiuser Configuration foldersFor the multiuser operating systems of Windows XP, Windows 2000, and Ma
79EXTENDING DREAMWEAVER CS4Extending DreamweaverExtension APIsThe extension APIs provide you with the functions that Dreamweaver calls to implement ea
80EXTENDING DREAMWEAVER CS4Extending DreamweaverPlug-ins (set to play at all times) are supported in the BODY of extensions. The document.write() stat
81EXTENDING DREAMWEAVER CS4Extending Dreamweaver <strings> <!-- errors for feature X --> <string id="featureX/subProblemY"
82Chapter 5: User interfaces for extensionsMost extensions are built to receive information from the user through a user interface (UI). For example,
83EXTENDING DREAMWEAVER CS4User interfaces for extensions• Applying changes to the user documentDreamweaver HTML rendering controlIn earlier versions
3EXTENDING DREAMWEAVER CS4IntroductionDocumentation Resource CenterImprove your Dreamweaver skills with books from Adobe. Check out the latest content
84EXTENDING DREAMWEAVER CS4User interfaces for extensionsThe following example shows the settings for an editable select list: <select name="
85EXTENDING DREAMWEAVER CS4User interfaces for extensions} </script> </head> <body> <div name="test"> <for
86EXTENDING DREAMWEAVER CS4User interfaces for extensionsThe following figure shows an advanced Recordset dialog box that uses a database tree control
87EXTENDING DREAMWEAVER CS4User interfaces for extensionsYou can change the connection attribute to retrieve selected data and display it in the tree.
88EXTENDING DREAMWEAVER CS4User interfaces for extensionsTree controls display data in a hierarchical format and let users expand and collapse nodes i
89EXTENDING DREAMWEAVER CS4User interfaces for extensionsFor readability, TREECOLUMN tags should follow immediately after the MM:TREECONTROL tag, as s
90EXTENDING DREAMWEAVER CS4User interfaces for extensionsManipulating content within a tree controlTree controls and the nodes within them are impleme
91EXTENDING DREAMWEAVER CS4User interfaces for extensionsIn this example, the user changes the value of the text box and then tabs or clicks elsewhere
92EXTENDING DREAMWEAVER CS4User interfaces for extensions<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
93EXTENDING DREAMWEAVER CS4User interfaces for extensionsThis example shows a simple implementation of the SWF file support of Dreamweaver. After you
Comments to this Manuals