MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Especificações

Consulte online ou descarregue Especificações para Manuais de software MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER. MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Specifications Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 504
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
Extending Dreamweaver
Vista de página 0
1 2 3 4 5 6 ... 503 504

Resumo do Conteúdo

Página 2

10 IntroductionInstalling an extensionTo become familiar with the process of writing extensions, you might want to explore the extensions and resource

Página 3

100 Extending DreamweaverTypes of Dreamweaver extensionsThe following list describes the types of Dreamweaver extensions that are documented in this g

Página 4 - 4Contents

Types of Dreamweaver extensions 101Server Behavior extensions add blocks of server-side code (ASP, JSP, or ColdFusion) to the document. The server-sid

Página 5 - Contents 5

102 Extending DreamweaverCode Hints are menus that offer a typing shortcut by displaying a list of strings that potentially complete the string you ar

Página 6 - 6Contents

Configuration folders and extensions 103The Configuration/Shared folder does not correspond to a specific extension type. It is the central repository

Página 7 - PART 4: APPENDIX

104 Extending DreamweaverMultiuser Configuration foldersFor the multiuser operating systems of Windows XP, Windows 2000, and Macintosh OS X, Dreamweav

Página 8 - 8Contents

Extension APIs 105To reload extensions1. Control-click (Windows) or Option-click (Macintosh) the Categories menu in the Insert bar’s title bar.2. Sele

Página 9 - Introduction

106 Extending DreamweaverHow Dreamweaver processes JavaScript in extensionsDreamweaver checks the Configuration/extension_type folder during startup.

Página 10 - Creating an extension

Localizing an extension 107Dreamweaver supports the use of event handlers within links. Event handlers in links must use syntax, as shown in the follo

Página 11 - What’s new in Dreamweaver

108 Extending Dreamweaver Do not write JavaScript code in the HTML files except for required event handlers. This eliminates the need to fix a bug mu

Página 12 - Deprecated functions

Working with the Extension Manager 109Localizable Strings with Embedded ValuesSome display strings have values embedded in them. You can use the errMs

Página 13

What’s new in Dreamweaver 11 Determine which files you need to modify or create. Plan the user interface (UI), if any, for the extension. Create th

Página 14 - 14 Introduction

110 Extending Dreamweaver

Página 15 - Customizing Dreamweaver

1114CHAPTER 4User Interfaces for ExtensionsMost extensions are built to receive information from the user through a user interface (UI). For example,

Página 16

112 User Interfaces for ExtensionsWhen you design an extension, you should determine what variables are necessary and what form elements can best hand

Página 17

Using custom UI controls in extensions 113In most cases, DOCTYPE statements must go on the first line of a document. However, to avoid conflicts with

Página 18 - Customizing page designs

114 User Interfaces for ExtensionsEditable select listsExtension UIs often contain pop-up lists that are defined using the select tag. In Dreamweaver,

Página 19

Using custom UI controls in extensions 115The following example creates a Command extension that contains an editable select list using common JavaScr

Página 20 - 20 Customizing Dreamweaver

116 User Interfaces for Extensions</select></td></tr></table></form></div></body></html>3.Save the fil

Página 21 - ■ Normal HTML-style tags

Using custom UI controls in extensions 117The following figure shows an advanced Recordset dialog box that uses a database tree control and a variable

Página 22 - <tagspec>

118 User Interfaces for ExtensionsAny option tags that are placed inside the select tag are ignored.To add a database tree control to a dialog box, yo

Página 23

Using custom UI controls in extensions 119The following example creates a variable grid control that is 500 pixels wide, with five columns of various

Página 24 - Contents

12 Introduction Streamlined handling of CSS stylesThe CSS Styles and Relevant CSS panels have been combined. The Design panel is now named CSS; the C

Página 25 - Container

120 User Interfaces for ExtensionsAdding tree controlsTree controls display data in a hierarchical format and let users expand and collapse nodes in t

Página 26 - 26 Customizing Dreamweaver

Using custom UI controls in extensions 121MM:TREECONTROL tags have the following attributes: MM:TREECOLUMN tags have the following attributes:For read

Página 27

122 User Interfaces for ExtensionsThe MM:TREENODE attributes are described in the following table:For example, the following tree control has all its

Página 28 - 28 Customizing Dreamweaver

Using custom UI controls in extensions 123The following example adds a node to the top level of a tree:var tree = document.myTreeControl;//add a top-l

Página 29 - <item>

124 User Interfaces for ExtensionsYou might want to keep a text box and a color picker synchronized. The following example creates a text box that syn

Página 30 - Working with browser profiles

Adding Flash content to Dreamweaver 125In Dreamweaver, open a new basic HTML file (this will be your Command definition file). Between the opening and

Página 31

126 User Interfaces for ExtensionsSave the file again. Next, exit and restart Dreamweaver. Select the Command > My Flash Movie menu option, and you

Página 32 - 32 Customizing Dreamweaver

1275CHAPTER 5The Dreamweaver Document Object ModelIn Macromedia Dreamweaver 8, the Document Object Model (DOM) is a critically important structure for

Página 33

128 The Dreamweaver Document Object ModelWhich document DOM?It is important to distinguish between the DOM of the user’s document and the DOM of the e

Página 34 - Changing FTP mappings

The Dreamweaver DOM 129Objects, properties, and methods of the Dreamweaver DOMThe following table lists the objects, properties, methods, and events t

Página 35 - Dreamweaver

Conventions used in this guide 13ErrataA current list of known issues can be found in the Extensibility section of the Dreamweaver Support Center (www

Página 36 - 36 Customizing Dreamweaver

130 The Dreamweaver Document Object ModelformIn addition to the properties that are available for all tags: tags:elements • (an array of button, check

Página 37

The Dreamweaver DOM 131Properties and methods of the document object The following table details the properties and methods of the document object tha

Página 38 - Tag Attribute

132 The Dreamweaver Document Object ModelProperties and methods of HTML tag objects Every HTML tag is represented by a JavaScript object. Tags are org

Página 39

The Dreamweaver DOM 133childNodes •A NodeList that contains all the immediate children of the tag.tagName •The HTML name for the tag, such as IMG, A,

Página 40

134 The Dreamweaver Document Object ModelProperties and methods of text objects Each contiguous block of text in an HTML document (for example, the te

Página 41 - Dynamic templates

The Dreamweaver DOM 135Properties and methods of comment objects A JavaScript object represents each HTML comment. The following table details the pro

Página 42 - 42 Customizing Dreamweaver

136 The Dreamweaver Document Object ModelTo find the specific version of Dreamweaver, check first for the existence of appVersion and then for the ver

Página 43 - To add a new document type:

1373PART 3Extension APIsLearn about functions that you need to write when you create new objects, toolbars, tag editors, floating panels, server behav

Página 45

1396CHAPTER 6Insert Bar ObjectsIn Macromedia Dreamweaver, objects insert specific strings of code into a user’s document. Objects commonly reside on t

Página 47 - <application>

140 Insert Bar ObjectsHow object files work Objects have the following components: The HTML file that defines what is inserted into a documentThe HE

Página 48 - <panelframe>

The Insert bar definition file 141The Insert bar definition fileThe Configuration/Objects/insertbar.xml file defines the Insert bar properties. This X

Página 49 - <panelcontainer>

142 Insert Bar ObjectsInsert bar definition tagsThe insertbar.xml file contains the following tags and attributes:<insertbar>DescriptionThis tag

Página 50 - <panel>

The Insert bar definition file 143<menubutton>DescriptionThis tag defines a pop-up menu for the Insert bar. Attributesid, image, {showIf}, {name

Página 51 - Product ID Panel

144 Insert Bar Objects<checkbutton />DescriptionA checkbutton is a button that has a checked or unchecked state. When clicked, a checkbutton app

Página 52 - To remove a button:

The Insert bar definition file 145image="image_path”DescriptionThis attribute specifies the path, relative to the Dreamweaver Configuration folde

Página 53 - Save the file

146 Insert Bar Objectsenabled="enabler"DescriptionThis attribute specifies that the item is available to the user if the DW_enabler value is

Página 54 - 54 Customizing Dreamweaver

The Insert bar definition file 147Examplecommand="dw.showTagChooser()"file="file_path"DescriptionThe file attribute specifies the

Página 55 - Customizing Code View

148 Insert Bar ObjectsModifying the Insert barYou can move objects from one category to another, rename categories, and completely remove objects from

Página 56 - The CodeHints.xml file

Modifying the Insert bar 149To change the order of categories in the Insert bar:1. Save a backup copy of insertbar.xml (with a name such as insertbar.

Página 57 - Code Hints tags

151PART 1Customizing DreamweaverYou can customize Macromedia Dreamweaver 8 to suit your web development needs, including changing settings in dialog b

Página 58 - <description>

150 Insert Bar Objects4. Edit the insertbar.xml file to identify the location of these new files and set attributes (see “The Insert bar definition fi

Página 59

A simple insert object example 151Creating the HTML fileThe title of the object is specified between the opening and closing title tags. You also spec

Página 60

152 Insert Bar ObjectsNext, decide whether to use objectTag() or insertObject() for the next function. The Strikethrough object simply wraps the s tag

Página 61 - <function>

A simple insert object example 153To separate the HTML object definition file from the supporting JavaScript functions:1. Create a new blank file.2. P

Página 62

154 Insert Bar Objects Each button tag in the XML file places an icon on the Insert bar and connects it to the proper HTML file or function.To add th

Página 63 - Code coloring

A simple insert object example 155To create the function:1. After the objectTag() function in Strikethrough.js, create a function called fontColorRed(

Página 64 - 64 Customizing Code View

156 Insert Bar Objects2. Save the file as Strikethrough.htm.3. Reload the extensions (see “Reloading extensions” on page 104).To test the dialog box:1

Página 65 - <scheme>

A simple insert object example 157Building an Insert bar pop-up menuThe Dreamweaver Insert bar introduces a new organization for objects and now suppo

Página 66 - <blockStart>

158 Insert Bar Objects// Manually wrap tags around selection.var dom = dw.getDocumentDOM();if (dw.getFocus() == 'textView' || dw.getFocus(tr

Página 67 - <brackets>

A simple insert object example 159To edit insertbar.xml:1. Find the following line of code near the beginning of the file:<insertbar xmlns:MMString

Página 69 - <cssMedia/>

160 Insert Bar Objects6. After the Strikethrough object button tag, add the hypertext object, as follows:<button id="DW_Blue_Text" image=

Página 70 - <cssSelector/>

The Objects API 161The Objects APIThis section describes the functions in the Objects API. You must define either the insertObject() or the objectTag(

Página 71 - <defaultTag>

162 Insert Bar ObjectsReturnsDreamweaver expects nothing.ExampleThe following example opens the myObjectHelp.htm file in a browser; this file explains

Página 72 - <entity/>

The Objects API 163Description This function is required if the objectTag() function is not defined. It is called when the user clicks OK. It either i

Página 73 - <idChar1>

164 Insert Bar Objects // do some document manipulation here. Exercise left to the reader } return errMsg;}objectTag()DescriptionThe objectT

Página 74 - <ignoreMMTParams>

The Objects API 165windowDimensions()DescriptionThis function sets specific dimensions for the Options dialog box. If this function is not defined, th

Página 75 - <keyword>

166 Insert Bar Objects

Página 76 - <operators>

1677CHAPTER 7CommandsMacromedia Dreamweaver 8 commands can perform almost any kind of edit to a user’s current document, other open documents, or any

Página 77 - <sampleText>

168 Commands4. Dreamweaver calls the commandButtons() function, if defined, to determine which buttons appear on the right side of the Options dialog

Página 78 - <stringStart>

A simple command example 169This example creates two files in the Commands folder: Change Case.htm, which contains the UI, and Change Case.js, which c

Página 79 - <stringEsc>

171CHAPTER 1Customizing DreamweaverIn addition to creating and using Dreamweaver extensions, you can customize Macromedia Dreamweaver in many ways, wh

Página 80 - <tagGroup>

170 CommandsThe contents of the Title tag, Make Uppercase or Lowercase, appears in the top bar of the dialog box. Within the form, a table with two ce

Página 81 - Sample code

A simple command example 171To determine whether the command should be active or dimmed:1. Create a new blank file.2. Add the following code:function

Página 82 - Sample Code

172 CommandsThe next part of the return statement (&& (theSelNode.nodeType == Node.TEXT_NODE) checks to see if the selected node type is text.

Página 83 - Scheme processing

A simple command example 173Linking functions to the OK and Cancel buttonsWhen the user clicks OK or Cancel, the extension needs to perform the approp

Página 84 - Wildcard characters

174 Commands// Get the node that contains the selection.var theSelNode = theDOM.getSelectedNode();// Get the children of the selected node.var theChil

Página 85 - Maximum string length

A simple command example 175The changeCase() function first tests the property document.forms[0].elements[0].checked. The document.forms[0].elements[0

Página 86 - Scheme precedence

176 CommandsTesting the extensionAfter you place the files in the Commands folder, you can test the extension.To test the extension:1. Restart Dreamwe

Página 87 - Editing schemes

The Commands API 177ExampleThe following example of the canAcceptCommand() function makes the command available only when the selection is a table:fun

Página 88 - 88 Customizing Code View

178 CommandsisDomRequired()DescriptionThis function determines whether the command requires a valid DOM to operate. If this function returns a value o

Página 89 - Code coloring examples

The Commands API 179Argumentsplatform The value of the platform argument is either "macintosh" or "windows", depending on the use

Página 90 - JavaScript code coloring

18 Customizing Dreamweaver Changing the default file type Customizing the interpretation of third-party tags Customizing workspace layouts Customi

Página 92 - Code validation

1818CHAPTER 8Menus and Menu CommandsMacromedia Dreamweaver 8 creates all its menus from the structure defined in the menus.xml file in the Dreamweaver

Página 93 - <property>

182 Menus and Menu CommandsAbout the menus.xml fileThe menus.xml file contains a structured list of menu bars, menus, menu commands, separators, short

Página 94 - <value>

About the menus.xml file 183 id The menu ID for the menu bar. Each menu ID in the menus.xml file should be unique. platform Indicates that the menu

Página 95

184 Menus and Menu Commands showIf Specifies that the menu should appear only if the given Dreamweaver enabler is the value true. The possible enable

Página 96 - 96 Customizing Code View

About the menus.xml file 185 key The keyboard shortcut for the command, if any. Use the following strings to specify modifier keys: Cmd specifies th

Página 97 - Overview of Extending

186 Menus and Menu Commands checked A JavaScript expression that indicates whether the menu command has a check mark next to it in the menu; if the e

Página 98

About the menus.xml file 187Attributes{app} app The name of the application in which the separator is shown. Not currently used.ContentsNone (empty t

Página 99

188 Menus and Menu Commands<shortcut>DescriptionSpecifies a keyboard shortcut in the menus.xml file.Attributeskey, {app}, {platform}, {file}, {a

Página 100 - 100 Extending Dreamweaver

About the menus.xml file 189<tool>DescriptionRepresents one tool; it contains all the shortcuts for the tool as subtags in the menus.xml file.At

Página 101

Ways to customize Dreamweaver 19Customizing the appearance of dialog boxesThe dialog box layouts for objects, commands, and behaviors are specified as

Página 102 - 102 Extending Dreamweaver

190 Menus and Menu CommandsExample<action name="Set magnification to 50%" key="5" command="dw.activeViewScale = 0.50"

Página 103

Changing menus and menu commands 191ContainerThis tag must be contained in a tool tag.Example<override name="Quick switch to Hand tool" k

Página 104 - Reloading extensions

192 Menus and Menu CommandsTo move a menu:1. Quit Dreamweaver.2. Make a backup copy of the menus.xml file.3. Open menus.xml in a text editor such as B

Página 105 - Extension APIs

Changing menus and menu commands 1933. Open menus.xml in a text editor such as BBEdit, HomeSite, or Wordpad. (Don’t open it in Dreamweaver.)4. Look at

Página 106

194 Menus and Menu Commands Items in the formats pop-up menu for a binding in the Bindings panel are specified in Formats.xml files, in subfolders of

Página 107 - Localizing an extension

Menu commands 195The following table lists the files you use to create a Menu command.Modifying the Commands menuYou can add certain kinds of commands

Página 108 - XML String files

196 Menus and Menu CommandsThe command is renamed in the Commands menu.To delete a command you’ve created:1. Select Commands > Edit Command List.A

Página 109

A simple menu command example 1975. Dreamweaver calls the receiveArguments() function, if defined, in the selected Menu Commands file to let the comma

Página 110 - 110 Extending Dreamweaver

198 Menus and Menu CommandsCreating the menu commandsAdd the following HTML menu tags to the end of the menus.xml file to create a menu called MyMenu

Página 111 - Extensions

A simple menu command example 199function canAcceptCommand(){ var selarray; if (arguments.length != 1) return false; var bResult = false; var what

Página 112

Trademarks1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute,

Página 113

20 Customizing DreamweaverChanging the default file typeBy default, Dreamweaver shows all the file types it recognizes in the File > Open dialog bo

Página 114 - Editable select lists

200 Menus and Menu CommandsIn this command, the receiveArguments() function processes the arguments and executes the command. More complex menu comman

Página 115 - Enter the following code:

A dynamic menu example 201The setMenuText() function looks like the following example code:function setMenuText(){ if (arguments.length != 1) return

Página 116 - Database controls

202 Menus and Menu CommandsCreating the dynamic menu itemsThe following menu tags in the menus.xml file define the Preview in Browser submenu of the F

Página 117 - Attribute name Description

A dynamic menu example 203for (i=0; i<PIB.length; i=i+2){browsers[j] = new String(PIB[i]);if (dw.getPrimaryBrowser() == PIB[i+1]) browsers[j] +=

Página 118

204 Menus and Menu Commandsfunction canAcceptCommand(){var PIB = dw.getBrowserList();if (arguments[0] == 'primary' || arguments[0] == '

Página 119

A dynamic menu example 205var selFile = selFiles[i];// For server connections, the files will// already be remote URLs.if (selFile.indexOf("://&q

Página 120 - Creating a tree control

206 Menus and Menu CommandsThe havePreviewTarget() function sets the value bHavePreviewTarget to false as the default return value. The function perfo

Página 121 - For readability

A dynamic menu example 207var theBrowser = null;var i=0;var browserList = null;var result = false;if (havePreviewTarget()){// Code to check if we were

Página 122

208 Menus and Menu Commandsif (whichBrowser == 'primary'){result = window.confirm(MSG_NoPrimaryBrowserDefined);}else if (whichBrowser == &ap

Página 123

The Menu Commands API 209If the user pressed the shortcut keys (F12 or Ctrl+F12) and no primary or secondary browser has been specified, a dialog box

Página 124

Ways to customize Dreamweaver 21Customizing the interpretation of third-party tagsServer-side technologies such as ASP, Macromedia ColdFusion, JSP, an

Página 125

210 Menus and Menu CommandsReturnsDreamweaver expects an array that contains an even number of elements. The first element is a string that contains t

Página 126

The Menu Commands API 211isCommandChecked()DescriptionDetermines whether to display a check mark next to the menu item.Arguments{arg1}, {arg2},...{arg

Página 127 - Object Model

212 Menus and Menu CommandsreceiveArguments()DescriptionProcesses any arguments passed from a menu item or from the dw.runCommand() function. If it is

Página 128 - The Dreamweaver DOM

The Menu Commands API 213 If the arguments attribute is defined for a menuitem tag, the value of that attribute passes to the setMenuText() function

Página 129 - Dreamweaver DOM

214 Menus and Menu CommandsExampleThe following example of windowDimensions() sets the dimensions of the Parameters dialog box to 648 x 520 pixels:fun

Página 130

2159CHAPTER 9ToolbarsYou can create a toolbar for Macromedia Dreamweaver 8 simply by creating a file that defines the toolbar and placing that file in

Página 131

216 ToolbarsSome types of toolbar controls, such as push buttons and pop-up menus, have icon images associated with them. Icon images are stored in an

Página 132

How toolbars work 217You cannot drag and drop toolbars between the document window and the Dreamweaver workspace frame. Toolbars remain a fixed size

Página 133

218 ToolbarsA simple toolbar command fileThis simple example implements a Title text box item as seen on the Dreamweaver Document toolbar. The text bo

Página 134

A simple toolbar command file 219canAcceptCommand(): enable the toolbar itemThe canAcceptCommand() function consists of one line of code that checks t

Página 135

22 Customizing Dreamweaver String-delimited tagsString-delimited tags start with one string and end with another string. They are like empty HTML tag

Página 136 - The site object

220 ToolbarsThe function is as follows:function getCurrentValue(){var title = "";var dom = dw.getDocumentDOM(); if (dom)title = dom.getTitle

Página 137

The toolbar definition file 221<!-- main toolbar --><toolbar id="DW_Toolbar_Main" label="Document"><radiobutton id=

Página 138

222 Toolbars container="mainframe" or "document" Defaults to "mainframe". Specifies where the toolbar should dock in th

Página 139 - Insert Bar Objects

The toolbar definition file 223 relativeTo="toolbar_id" This attribute is required if the initialPosition attribute specifies below. Otherw

Página 140 - How object files work

224 Toolbars<itemtype/>DescriptionDefines a single toolbar item. Toolbar items include buttons, radio buttons, check buttons, combo boxes, pop-u

Página 141 - Insertbar.xml tag hierarchy

The toolbar definition file 225 showIf="script" Specifies that this item appears on the toolbar only if the specified script returns a true

Página 142 - Insert bar definition tags

226 ToolbarsToolbar item tagsEach type of toolbar item has its own tag and set of required and optional attributes. You can define toolbar items eithe

Página 143 - <button />

Toolbar item tags 227<checkbutton>DescriptionA check button is a button that has a checked or unchecked state and that executes a specific comma

Página 144 - <separator />

228 ToolbarsRadio buttons act the same as the Code view, Design view, and Split view buttons on the Dreamweaver document toolbar.Attributesid, image,

Página 145 - and _VIEW_STANDARD

Toolbar item tags 229ContentsNone.ContainerThe toolbar tag or the toolbarset tag.Example<MENUBUTTON ID="DW_CodeNav"image="Toolbars/i

Página 146 - Description

Ways to customize Dreamweaver 23 content_model describes what kinds of content the tag can contain and where in an HTML file the tag can appear. Vali

Página 147

230 Toolbars<combobox>DescriptionA combo box is an editable pop-up menu that executes its command when you select an entry or when the user make

Página 148 - Modifying the Insert bar

Toolbar item tags 231ContainerThe toolbar tag or the toolbarset tag.Example<EDITCONTROL ID="DW_SetTitle"label="Title: "tooltip=

Página 149 - To create a new category:

232 ToolbarsItem tag attributesThe attributes for toolbar item tags have the following meanings: id="unique_id"Required. The id attribute is

Página 150 - 150 Insert Bar Objects

Item tag attributes 233If an icon is specified for a color picker, the icon replaces the color picker entirely. If the colorRect attribute is also set

Página 151 - Creating the HTML file

234 Toolbarslabel="label string"Optional. This attribute specifies a label that displays next to the item. Dreamweaver does not automaticall

Página 152 - 152 Insert Bar Objects

Item tag attributes 235file="command_file_path"Required for pop-up menus and combo boxes. The file attribute is optional for other types of

Página 153 - Creating the image

236 ToolbarsExamplechecked="dw.getDocumentDOM() != null && dw.getDocumentDOM().getView() == 'code'"value="script"

Página 154 - Adding a dialog box

Item tag attributes 237The following list shows the possible handlers for update_frequency_list, from least to most frequent. If you do not specify th

Página 155 - To add the form:

238 ToolbarsExamplecommand="dw.toggleLiveDebug()"arguments="argument_list" Optional. This attribute specifies the comma-separated

Página 156 - Click the Red Text checkbox

The toolbar command API 239canAcceptCommand()AvailabilityDreamweaver MX.DescriptionDetermines whether the toolbar item is enabled. The enabled state i

Página 157 - To organize the files:

24 Customizing Dreamweaver detect_in_attribute indicates whether to ignore everything between start_string and end_string (or between opening and clo

Página 158 - To create the image:

240 ToolbarsgetCurrentValue()AvailabilityDreamweaver MX.DescriptionReturns the current value to display in the item. Dreamweaver calls the getCurrentV

Página 159 - To edit insertbar.xml:

The toolbar command API 241The name getDynamicContent() is a misnomer because this function should be used even if the list of entries in the menu is

Página 160 - To test the new pop-up menu:

242 ToolbarsgetMenuID()AvailabilityDreamweaver MX.DescriptionOnly valid for menu buttons. Dreamweaver calls the getMenuID() function to get the ID of

Página 161 - The Objects API

The toolbar command API 243menuID = 'DWBrowseOptionsPopup';}}return menuID;}getUpdateFrequency()AvailabilityDreamweaver MX.DescriptionSpecif

Página 162 - 162 Insert Bar Objects

244 ToolbarsDescriptionReturns a value that specifies whether the item is selected. For a button, checked means that the button appears on or depresse

Página 163 - Example

The toolbar command API 245 else if (style == "Heading 6") bChecked = (textFormat == "h6"); else bChecked = (dw.cssStyleP

Página 164

246 ToolbarsArgumentsFor pop-up menus, combo boxes, text boxes, and color pickers, the first argument is the current value within the control. The get

Página 165

The toolbar command API 247ReturnsDreamweaver expects a Boolean value: true if the item appears; false otherwise.Examplefunction showif(){var retval =

Página 167 - Commands

24910CHAPTER 10ReportsMacromedia Dreamweaver 8 supports two types of reports: site reports and stand-alone reports.Site reportsYou use the Reports API

Página 168 - A simple command example

Ways to customize Dreamweaver 25ContainerNone.Example<tagspec tag_name="happy" tag_type="nonempty" render_contents="false&

Página 169 - Creating the UI

250 ReportsHow site reports work1. Reports are accessible through the Site > Reports command. When it is selected, this command displays a dialog b

Página 170 - Writing the JavaScript code

Site reports 251You create this extension by performing the following steps: Creating the report definition Writing the JavaScript codeThis example

Página 171 - A simple command example 171

252 ReportsWriting the JavaScript codeDreamweaver includes the Reports.js file. You can call any of the functions in Reports.js. However, you also hav

Página 172 - 172 Commands

Stand-alone reports 253Stand-alone reportsYou can use the Results Window API to create a stand-alone report. Stand-alone reports are regular commands

Página 173 - A simple command example 173

254 Reports5. To call the addItem() function, the processFile() function needs to have access to the Results window that was created by the stand-alon

Página 174 - 174 Commands

Stand-alone reports 255Writing the JavaScript codeNext, you create the JavaScript file that contains any functions that are specific to your stand-alo

Página 175 - A simple command example 175

256 ReportsThe Reports APIThe only required function for the Reports API is the processFile() function. All other functions are optional.processFile()

Página 176 - The Commands API

The Reports API 257ReturnsDreamweaver expects a Boolean value: true if the report runs successfully; false if target is excluded from the report run.

Página 177

258 ReportsExampleThe following instance of the commandButtons() function defines the OK, Cancel, and Help buttons.function commandButtons(){return ne

Página 178 - 178 Commands

The Reports API 259ReturnsDreamweaver expects a string of the form "widthInPixels,heightInPixels".The returned dimensions are smaller than t

Página 179

26 Customizing DreamweaverAvoiding rewriting third-party tagsDreamweaver corrects certain kinds of errors in HTML code. For details, see Using Dreamwe

Página 181 - Menus and Menu Commands

26111CHAPTER 11Tag Libraries and EditorsMacromedia Dreamweaver 8 users can use tag editors to insert new tags, edit existing tags, and access referenc

Página 182 - About the menus.xml file

262 Tag Libraries and EditorsTag library file formatA tag library consists of a single root file, the TagLibraries.vtm file, that lists every installe

Página 183 - <menu>

Tag library file format 263</taglibrary><taglibrary name="ASP.NET Tags" doctypes="ASP.NET_CSharp,ASP.NET_VB"¬ servermodel

Página 184 - <menuitem>

264 Tag Libraries and EditorsThe following table lists tagref attributes:Because the tagref.prefix attribute can override the taglibrary.prefix attrib

Página 185 - About the menus.xml file 185

Tag library file format 265To define tags, Dreamweaver uses a modified version of the Macromedia VTML file format. The following example demonstrates

Página 186 - <separator>

266 Tag Libraries and EditorsThe following table lists the attributes that define tags: Attribute Description Mandatory/optionaltag.bindUsed by the Da

Página 187 - <shortcutlist>

Tag library file format 267tagformat.nlaftertagThe number of newline characters to insert after this tag. Optionalattrib.nameThe name of the attribute

Página 188 - <shortcut>

268 Tag Libraries and EditorsThe Tag ChooserThe Tag Chooser lets you view tags in functional groups so you can easily access frequently used tags. In

Página 189 - <action>

The Tag Chooser 269The following table lists the tags that are available for use in the TagChooser.xml files:The CATEGORY tag represents all other nod

Página 190 - <override>

Customizing Dreamweaver in a multiuser environment 27To turn off Dreamweaver encoding options:1. Select Edit > Preferences, and select the Code Rew

Página 191

270 Tag Libraries and EditorsThe following table lists the attributes of the ELEMENT tag, which represents the tag to insert:A simple example of creat

Página 192 - Changing keyboard shortcuts

A simple example of creating a new tag editor 271Registering the tag in the tag libraryFor Dreamweaver to recognize the new tag, it must be identified

Página 193

272 Tag Libraries and EditorsCreating a tag definition (VTML) file When a user selects a registered tag using the Tag Chooser or a tag editor, Dreamwe

Página 194 - Menu commands

A simple example of creating a new tag editor 273// inspectTag() API function defined (required by all tag editors) function inspectTag(tagNodeObj){

Página 195 - Modifying the Commands menu

274 Tag Libraries and Editors <tr> <td valign="baseline" align="right" nowrap="nowrap">Type: </t

Página 196 - How menu commands work

Tag editor APIs 275 The cfweather tag appears in the list box on the right. Select cfweather, and click the Insert button. The tag editor should ap

Página 197 - A simple menu command example

276 Tag Libraries and EditorsvalidateTag()AvailabilityDreamweaver MX.DescriptionWhen a user clicks on a node in the tree control or clicks OK, the fun

Página 198 - Creating the menu commands

Tag editor APIs 277ExampleContinuing the cfweather example, in the following code, if the user changes the ZIP code from 94065 to 53402, in order to u

Página 199

278 Tag Libraries and Editors

Página 200 - 200 Menus and Menu Commands

27912CHAPTER 12Property InspectorsThe Property inspector is perhaps the most familiar floating panel in the Macromedia Dreamweaver 8 interface. It is

Página 201 - A dynamic menu example

28 Customizing DreamweaverMac OS X platforms use the following location:drive:Users/username/Library/Application Support/Macromedia/Dreamweaver 8/Conf

Página 202

280 Property InspectorsThis comment has the following elements: The serverModel element specifies that Dreamweaver should load this Property inspect

Página 203 - A dynamic menu example 203

How Property inspector files work 281How Property inspector files workAt start up, Dreamweaver reads the first line of each HTM and HTML file in the C

Página 204 - 204 Menus and Menu Commands

282 Property InspectorsA simple Property inspector exampleThe following Property inspector inspects the MARQUEE tag, which is available only in Micros

Página 205 - A dynamic menu example 205

A simple Property inspector example 283z-index:16; left: 44px; top: 5px">Marquee</SPAN><!-- If your form fields are in different laye

Página 206 - 206 Menus and Menu Commands

284 Property Inspectors// Get the value of the DIRECTION attribute on the MARQUEE tag. var theDirection = theObj.getAttribute('direction');/

Página 207 - A dynamic menu example 207

The Property inspector API 285Creating the imageYou can optionally create the image that appears in the Property inspector.To create the image:1. Crea

Página 208 - 208 Menus and Menu Commands

286 Property InspectorsArgumentsNone.ReturnsDreamweaver expects a Boolean value: true if the inspector can inspect the current selection; false otherw

Página 209 - The Menu Commands API

The Property inspector API 287inspectSelection()DescriptionRefreshes the contents of the text fields based on the attributes of the current selection.

Página 211

28913CHAPTER 13Floating PanelsYou can create any kind of floating panel or inspector without the size and layout limitations of Property inspectors. A

Página 212 - 212 Menus and Menu Commands

Customizing Dreamweaver in a multiuser environment 29About mm_deleted_files.xml tag syntaxThe mm_deleted_files.xml file contains a structured list of

Página 213

290 Floating PanelsHow floating panel files workCustom floating panels can be moved, resized, and tabbed together the same way as the floating panels

Página 214 - 214 Menus and Menu Commands

A simple floating panel example 2914. When the floating panel is visible, the following actions occur: When the selection changes, the selectionChang

Página 215 - Toolbars

292 Floating PanelsTo create the HTML file header:1. Create a new blank document.2. Enter the following:<!doctype html public "-//W3C//DTD HTM

Página 216 - How toolbars behave

A simple floating panel example 293Both div tags use the style attribute to specify the position (absolute), size (width:422px and height:181px), and

Página 217 - How toolbar commands work

294 Floating PanelsThe selectionChanged() function first calls the dw.getDocumentDOM() function to get the Document Object Model (DOM) for the user’s

Página 218 - A simple toolbar command file

A simple floating panel example 295If the selected node is not an element, or it is not a SCRIPT tag, the selectionChanged() function makes the blankl

Página 219

296 Floating PanelsupdateScript(): write back changes The updateScript() function writes back the selected script when an onBlur event occurs in the t

Página 220 - The toolbar definition file

The Floating panel API 297If you select a script marker in Design view for the current document and then select the Script Editor menu item, it invoke

Página 221 - <toolbar>

298 Floating PanelsExample// the following instance of displayHelp() opens// in a browser a file that explains how to use// the extension.function dis

Página 222 - 222 Toolbars

The Floating panel API 299getDockingSide()AvailabilityDreamweaver MX.DescriptionSpecifies the locations at which a floating panel can dock. The functi

Página 223 - <include/>

3ContentsIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Background . . . . . . . . . . . . .

Página 224 - <itemref/>

30 Customizing DreamweaverContainerThis tag must be contained in a deleteditems tag.Example<item name="snippets\headers\5columnwith4links.csn&

Página 225 - <separator/>

300 Floating PanelsExampleThe following example of the initialPosition() function specifies that the first time the floating panel appears, it should

Página 226 - Toolbar item tags

The Floating panel API 301isATarget() AvailabilityDreamweaver MX (Windows only).DescriptionSpecifies whether other panels can dock to this floating pa

Página 227 - <radiobutton>

302 Floating PanelsisResizable()AvailabilityDreamweaver 4. DescriptionDetermines whether a user can resize a floating panel. If the function is not de

Página 228

The Floating panel API 303Example The following example of selectionChanged() shows a different layer in the floating panel, depending on whether the

Página 229 - <dropdown>

304 Floating Panels/* create a flag that specifies whether an edit is being processed, and set it to false. */document.running = false;/* this functio

Página 230 - <editcontrol>

30514CHAPTER 14Behaviors Behaviors let users make their HTML pages interactive. They offer web designers an easy way to assign actions to page element

Página 231 - <colorpicker>

306 BehaviorsHow Behaviors workWhen a user selects an HTML element in a Dreamweaver document and clicks the Plus (+) button on the Behaviors panel, th

Página 232 - Item tag attributes

A simple behavior example 307Inserting multiple functions in the user’s fileActions can insert multiple functions—the main behavior function plus any

Página 233 - Item tag attributes 233

308 BehaviorsCreating the behavior extensionThe following code presents a relatively simple example. It checks the brand of the browser and goes to on

Página 234 - 234 Toolbars

A simple behavior example 309 "\')"; }else{ return "Please enter URLs in both fields." }}// Extract the arguments fro

Página 235 - Item tag attributes 235

Working with browser profiles 31 You must use a space in the following places: Before the closing angle bracket (>) on the !ELEMENT line After

Página 236 - 236 Toolbars

310 Behaviors<tr><td nowrap="nowrap">&nbsp;&nbsp;Go to this URL is the browser is ¬Microsoft Internet Explorer:<br>

Página 237 - Item tag attributes 237

A simple behavior example 3114. Save the file as netscapecontent.htm in the same directory as the iecontent.htm file.5. Restart Dreamweaver.6. Create

Página 238 - The toolbar command API

312 Behaviors<body onLoad="checkBrowserBrand('netscaptecontent.htm','iecontent.htm')"></body></html>Te

Página 239 - Availability

The Behaviors API 313ReturnsDreamweaver expects a string that contains the function call to be inserted in the user’s document, usually after acceptin

Página 240 - 240 Toolbars

314 BehaviorsbehaviorFunction()DescriptionThis function inserts one or more functions—surrounded by the following tags, if they don’t yet exist—into t

Página 241

The Behaviors API 315canAcceptBehavior()DescriptionThis function determines whether the action is allowed for the selected HTML element and specifies

Página 242

316 BehaviorsdisplayHelp()DescriptionIf this function is defined, a Help button appears below the OK and Cancel buttons in the Parameters dialog box.

Página 243 - The toolbar command API 243

The Behaviors API 317identifyBehaviorArguments()DescriptionThis function identifies arguments from a behavior function call as navigation links, depen

Página 244

318 BehaviorsExampleThis simple example of the identifyBehaviorArguments() function works for the Open Browser Window behavior action, which returns a

Página 245 - The toolbar command API 245

The Behaviors API 319inspectBehavior()DescriptionThis function inspects the function call for a previously applied behavior in the user’s document and

Página 246 - 246 Toolbars

32 Customizing DreamweaverThe following example shows an entry for the APPLET tag that would be accurate for Netscape Navigator 3.0: <!ELEMENT APPL

Página 247 - The toolbar command API 247

320 BehaviorswindowDimensions()DescriptionThis function sets specific dimensions for the Parameters dialog box. If this function is not defined, the w

Página 248 - 248 Toolbars

32115CHAPTER 15Server BehaviorsMacromedia Dreamweaver 8 provides users with an interface for adding server behaviors into their documents to perform s

Página 249 - Site reports

322 Server Behaviors Runtime code Runtime code is the set of code blocks that are added to a document when a server behavior is applied. These code

Página 250 - A simple site report example

Dreamweaver architecture 323Group filesGroup files contain a list of participants, and participant files have all server-model-specific code data. Par

Página 251 - Site reports 251

324 Server BehaviorsWhen Dreamweaver adds a server behavior to a document, it needs to have detailed information, including where to insert the code,

Página 252

A simple server behavior example 325Creating the dynamic page documentFirst, you create a new ASP document.To create a new dynamic page document:1. In

Página 253 - Stand-alone reports

326 Server Behaviors6. In the Relative Position pop-up menu, select After the Selection.7. Click OK.In the Server Behaviors panel, you can see that th

Página 254 - Creating the dialog box UI

How the Server Behavior API functions are called 327Sometimes during analysis, a single tag in the user’s document is identified by two or more behavi

Página 255

328 Server Behaviors If the user edits an existing server behavior by double-clicking it, Dreamweaver displays the dialog box, executes the onLoad ha

Página 256 - The Reports API

The Server Behavior API 329The Server Behavior APIYou can manage server behaviors with the following API functions.analyzeServerBehavior()Availability

Página 257 - The Reports API 257

Working with browser profiles 333. Add any new tags or attributes that you know are supported by the browser, using the syntax shown in “About browser

Página 258 - 258 Reports

330 Server BehaviorsArgumentsserverBehavior, [serverBehaviorArray] The serverBehavior argument is a JavaScript object that represents the behavior to

Página 259 - The Reports API 259

The Server Behavior API 331canApplyServerBehavior()AvailabilityDreamweaver UltraDev 1.DescriptionDetermines whether a behavior can be applied. Dreamwe

Página 260 - 260 Reports

332 Server BehaviorsArgumentsserverBehavior The serverBehavior JavaScript object represents the behavior. ReturnsDreamweaver expects a Boolean value:

Página 261 - Tag Libraries and Editors

The Server Behavior API 333Example// the following instance of displayHelp() opens// in a browser a file that explains how to use// the extension.func

Página 262 - Tag library file format

334 Server BehaviorsDescriptionDetermines the settings for the Server Behavior dialog box, based on the specified behavior object. Dreamweaver calls t

Página 263

Server behavior implementation functions 335ReturnsDreamweaver expects a Boolean value: true if the behavior pastes successfully from the Clipboard; f

Página 264

336 Server Behaviorsdwscripts.applySB()AvailabilityDreamweaver MX (this function replaces the applySB() function from earlier versions of Dreamweaver)

Página 265 - Tag library file format 265

Editing EDML files 337dwscripts.deleteSB()AvailabilityDreamweaver MX (this function replaces the deleteSB() function from earlier versions of Dreamwea

Página 266 - For example, the input tag

338 Server BehaviorsRegular expressionsYou must understand regular expressions as they are implemented in JavaScript 1.5. You must also know when it i

Página 267

Editing EDML files 339This process searches the user’s document, and if there is a match, extracts the parameter values. The first parenthetical subex

Página 268 - The Tag Chooser

34 Customizing DreamweaverChanging FTP mappingsThe FTPExtensionMap.txt file (Windows) and the FTPExtensionMapMac.txt file (Macintosh) map filename ext

Página 269 - Optional

340 Server BehaviorsBecause of the CDATA tag, the ASP tags <%= %>, along with the other content within the tag, aren’t processed. Instead, the E

Página 270 - Attribute Description

Group EDML file tags 341ParentgroupTypeAttribute.RequiredNo.serverBehaviorDescriptionThe serverBehavior attribute indicates which server behavior can

Página 271 - To register the tag:

342 Server BehaviorsMultiple versions of a server behavior can differ, depending on which data source you use. For example, the Repeat Region server b

Página 272 - Creating a tag editor UI

Group EDML file tags 343ParentgroupTypeAttribute.RequiredNo.ValueThe value is a unique string that determines which group to apply, as shown in the fo

Página 273

344 Server BehaviorsValueThe value is a plain text string that can include parameter names to make each instance unique, as shown in the following exa

Página 274 - Adding a tag to Tag Chooser

Group EDML file tags 345ValueThe participantName value is the exact name (without the .edml extension) of a single participant file that is listed as

Página 275 - Tag editor APIs

346 Server BehaviorsValueThe value is the exact name (without the .edml extension) of any participant file, as shown in the following example:<grou

Página 276 - 276 Tag Libraries and Editors

Participant EDML files 347Participant EDML filesThese tags and attributes are valid within the EDML participant files.<participant>DescriptionTh

Página 277 - object must be updated:

348 Server BehaviorsParentparticipantTypeAttribute.RequiredNo.<quickSearch>DescriptionThis tag is a simple search string that is used for perfor

Página 278 - 278 Tag Libraries and Editors

Participant EDML files 349<insertText>DescriptionThis tag provides information about what to insert in the document and where to insert it. It c

Página 279 - Property Inspectors

Extensible document types in Dreamweaver 35Extensible document types in DreamweaverXML provides a rich system for defining complex documents and data

Página 280 - 280 Property Inspectors

350 Server BehaviorsParentinsertTextTypeAttribute.RequiredYes.ValuesaboveHTML[+weight], belowHTML[+weight], beforeSelection, replaceSelection, wrapSel

Página 281

Participant EDML files 351 The beforeNode value inserts the text before a node, which is a specific location in the DOM. When a function such as dwsc

Página 282 - Creating the user interface

352 Server BehaviorsRequiredThis attribute is required only if the insert location contains the word node.ValueThe tagtype__Tag value is a user-specif

Página 283

Participant EDML files 353<searchPatterns> attributesThe following items are valid attributes of the searchPatterns tag.whereToSearchDescription

Página 284 - 284 Property Inspectors

354 Server Behaviors The comment value searches only within the HTML comments <! ... >, as shown in the following example:<searchPatterns wh

Página 285 - The Property inspector API

Participant EDML files 355 The <empty> value is used if no pattern is given. It is always considered a match, and the entire value is assigned

Página 286 - 286 Property Inspectors

356 Server BehaviorsThe parameter names should match the ones that are specified in the insertion text and the update parameters.ParentsearchPatternTy

Página 287

Participant EDML files 357RequiredNo.Valuesall, attribute+attribName, tagOnly, innerOnly The all value (default) searches the entire tag that is spec

Página 288 - 288 Property Inspectors

358 Server BehaviorsValuestrue, false The value is true if the searchPattern is not necessary to identify the participant. The value is false (defau

Página 289 - Floating Panels

Participant EDML files 359TypeBlock tag.RequiredNo.<updatePattern>DescriptionThis tag is a specific type of regular expression that lets you upd

Página 290 - How floating panel files work

36 Customizing DreamweaverColdFusion ComponentDynamic cfcJSP JSP Dynamic jspPHP PHP Dynamic php, php3Library Item DWExtension lbiASP.NET C# TemplateDW

Página 291 - Creating the floating panels

360 Server BehaviorsThe literal parentheses, as well as other special regular expression characters, are escaped by preceding them with a backslash (\

Página 292 - 292 Floating Panels

Participant EDML files 361TypeAttribute.RequiredYes.ValuesThe value is the exact name of a parameter that is used in the insertion text. In the follow

Página 293

362 Server BehaviorsParentdeleteTypeAttribute.RequiredNo.Valuesall, none, tagOnly, innerOnly, attribute+attribName, attribute+* The all value (defaul

Página 294 - 294 Floating Panels

Participant EDML files 363TypeBlock tag.RequiredNo.<searchPatterns>DescriptionThis tag lets Dreamweaver find each specified instance in a docume

Página 295

364 Server Behaviors<translation>DescriptionThis tag contains a single translation instruction that includes the location for the participant, w

Página 296 - Creating a menu item

Participant EDML files 365TypeAttribute.RequiredNo.translationTypeDescriptionThis attribute indicates the type of translation to perform. These types

Página 297 - The Floating panel API

366 Server Behaviors The tabbed region start value indicates that the translated <CFLOOP> tags define the beginning of a tabbed outline, as sho

Página 298

Participant EDML files 367<attributes>DescriptionThis tag contains a list of attributes to add to the translated tag that is specified by the op

Página 299 - The Floating panel API 299

368 Server Behaviors<display>DescriptionThis tag is an optional display string that should be inserted in the translation.ParenttranslationTypeB

Página 300

Server behavior techniques 369Server behavior techniquesThis section covers the common and advanced techniques that create and edit server behaviors.

Página 301 - The Floating panel API 301

Extensible document types in Dreamweaver 37If you need to create a new document type, you can either add your entry to the document definition file th

Página 302 - 302 Floating Panels

370 Server BehaviorsThe search string is defined as a regular expression by starting and ending with a slash (/) and is followed by i, which means tha

Página 303 - About performance

Server behavior techniques 371How participants are matched If a server behavior has more than one participant, the participants must be identified in

Página 304 - 304 Floating Panels

372 Server BehaviorsThere are two instances of Test listed in the Server Behaviors panel. If the user tries to add a third instance to the page and na

Página 305 - Behaviors

Server behavior techniques 373This server behavior no longer works correctly because only one parameter is named total. To solve this problem, make su

Página 306 - How Behaviors work

374 Server Behaviors3. Look for the limitSearch attribute within the searchPattern tag.4. If the attribute value starts with attribute+, the remaining

Página 307 - A simple behavior example

Server behavior techniques 375This example might use the following search patterns: <quickSearch>Response.Write</quickSearch><searchPat

Página 308 - 308 Behaviors

376 Server BehaviorsDeleting server behaviorsDefault deletion and dependency counts The user can delete an instance that is selected in the Server Be

Página 309 - A simple behavior example 309

Server behavior techniques 377If a JavaScript file has the SHARE-IN-MEMORY directive and an HTML file references it (by using the SCRIPT tag with the

Página 310 - 310 Behaviors

378 Server Behaviors

Página 311 - A simple behavior example 311

37916CHAPTER 16Data SourcesThe Macromedia Dreamweaver 8 Data Sources API functions let you add data sources, which appear in the Plus (+) menu in the

Página 312 - The Behaviors API

38 Customizing DreamweaverThe following table describes the tags and attributes that you can use within a document type definition file. Element Type

Página 313 - The Behaviors API 313

380 Data SourcesHow data sources work Dreamweaver users can add dynamic data by using the Bindings panel. The dynamic data objects that are shown on t

Página 314

How data sources work 381RequestNameOfRequestVariableNameOfAnotherRequestVariableSessionNameOfSessionVariable4.If the user double-clicks on a data sou

Página 315

382 Data Sources8. Every time the user changes the selection, Dreamweaver calls the inspectDynamicDataRef() function to determine whether the new sele

Página 316 - 316 Behaviors

A simple data source example 383When a user clicks on the Bindings Plus (+) menu, Dreamweaver searches the DataSources folder for the current server m

Página 317

384 Data SourcesTo create the EDML file:1. Create a new blank file.2. Enter the following:<participant> <quickSearch><![CDATA[#]]>

Página 318 - 318 Behaviors

A simple data source example 385 { var theResponse = MM.MyDatasourceContents; if (theResponse.length) { var siteURL = dw.getSiteRoot();

Página 319

386 Data Sources{ var retVal = new Array(); var siteURL = dw.getSiteRoot(); // For localized object name... if (sourceName != "MyDatasource&q

Página 320

A simple data source example 387 var params = extPart.findInString("MyDatasource_DataRef", expression); if (params) { retArray

Página 321 - Server Behaviors

388 Data SourcesTo create the command definition file:1. Create a new blank file.2. Enter the following:<!DOCTYPE HTML SYSTEM "-//Macromedia//

Página 322 - Dreamweaver architecture

A simple data source example 389function okClicked(){ var nameObj = document.forms[0].theName; if (nameObj.value) { if (IsValidVarName(nameObj.va

Página 323 - Participant files

Extensible document types in Dreamweaver 39internaltypeYes A broad classification of how Dreamweaver treats a file. The internaltype identifies whethe

Página 324 - The script file

390 Data Sources2. Click the MyDatasource data source option, and the MyDatasource Variable dialog box you created appears:3. Enter a value in the dia

Página 325 - Defining the code to insert

The Data Sources API 391The Data Sources API The functions in the Data Sources API let you find, add, edit, and delete data sources and also generate

Página 326 - 326 Server Behaviors

392 Data SourcesFor example, in Dreamweaver, if the selection is a recordset or command, the deleteDynamicSource() function calls the dw.serverBehavio

Página 327

The Data Sources API 393editDynamicSource() AvailabilityDreamweaver MX.DescriptionThis function is called when the user double-clicks a data source na

Página 328 - 328 Server Behaviors

394 Data SourcesReturnsDreamweaver expects an array of JavaScript objects where each object can have as many as five properties, which are described i

Página 329 - The Server Behavior API

The Data Sources API 395ArgumentssourceName, bindingName The sourceName argument is the name of the top-level node that is associated with the child

Página 330 - 330 Server Behaviors

396 Data Sources The dataSource property is the simple name of the file in which the findDynamicSources() function is defined. For example, the findD

Página 331 - The Server Behavior API 331

The Data Sources API 397Argumentsstring The string argument is the dynamic data object.ReturnsDreamweaver expects an array of two elements (parent na

Página 333 - The Server Behavior API 333

39917CHAPTER 17Server FormatsChapter 16, “Data Sources,” on page 379, discusses how Macromedia Dreamweaver 8 inserts dynamic data into a user’s docume

Página 334 - 334 Server Behaviors

4ContentsChapter 4: User Interfaces for Extensions. . . . . . . . . . . . . . . . . . . 111Designing an extension user interface . . . . . . . . . .

Página 335

40 Customizing DreamweaverwinfileextensionYes The file extension that is associated with the document type on Windows. You specify multiple file exten

Página 336

400 Server FormatsOne example might be to create a new currency format. Essentially, all currency formatting consists of converting a number to a stri

Página 337 - Editing EDML files

How data formatting works 401The following example shows the format tag for the "Currency - default" string: <format file="Currency&

Página 338 - Regular expressions

402 Server FormatsWhen the data formatting functions are calledThe data formatting functions are called in the following scenarios: In the Dynamic Da

Página 339 - Notes about EDML structure

The Server Formats API 403The Server Formats API The server formats API consists of the following data formatting functions.applyFormat()AvailabilityD

Página 340 - Group EDML file tags

404 Server FormatsDescriptionCommits the changes to a format that was created using the Edit Format dialog box. Users can create, edit, or delete form

Página 341 - Group EDML file tags 341

The Server Formats API 405ReturnsDreamweaver expects nothing.formatDynamicDataRef()AvailabilityDreamweaver UltraDev 1.DescriptionAdds the format funct

Página 342 - Required

406 Server FormatsinspectFormatDefinition()AvailabilityDreamweaver UltraDev 1.DescriptionInitializes form controls when a user edits a format in the E

Página 343 - <title>

40718CHAPTER 18ComponentsMacromedia Dreamweaver supports the creation of many of the most popular types of components. In addition, Dreamweaver lets y

Página 344 - <groupParticipants>

408 ComponentsExtending the Components panelIf you have invented (or simply use) a component strategy that is not represented in Dreamweaver’s current

Página 345 - <groupParticipant>

Components panel files 409Extensibility lets you add new component types to the panel. There are several general steps that you need to follow when ad

Página 346 - 346 Server Behaviors

Extensible document types in Dreamweaver 41When Dreamweaver starts, it reads all document type definition files and builds a list of valid document ty

Página 347 - Participant EDML files

410 Componentsclasslocation="d:\music\music.jar"></javabean></javabeans>JavaBeans should contain the logic for saving themsel

Página 348 - <quickSearch>

Components panel files 4112. Write the JavaScript code to implement the new server component.The extension file (HTM) defines the locations of the Jav

Página 349 - <insertText> attributes

412 ComponentsFor example, the following WebServicesClass node has web methods as its children:this.name = "TrafficLocatorWebService"; this.

Página 350

Components panel API functions 413getContextMenuId()AvailabilityDreamweaver MX.Description Returns the Context Menu ID for the component type. Every c

Página 351

414 ComponentsgetCodeViewDropCode()AvailabilityDreamweaver MX.DescriptionThis function gets the code that is dragged and dropped in Code view from the

Página 352 - <searchPatterns>

Components panel API functions 415getSetupSteps()AvailabilityDreamweaver MX.DescriptionDreamweaver calls this function if the setupStepsCompleted() fu

Página 353

416 ComponentsExampleThe following example sets four steps for ColdFusion components, and provides a hypertext link in the fourth step so the user can

Página 354 - <searchPattern>

Components panel API functions 417DescriptionDreamweaver calls this function before the Components tab appears. Dreamweaver then calls the getSetupSte

Página 355

418 ComponentsReturnsA Boolean value that indicates whether the drop operation was successful: true if successful; false otherwise.Example The followi

Página 356 - 356 Server Behaviors

Components panel API functions 419ArgumentscomponentRec The componentRec argument is an object that contains the following properties: The name prop

Página 357 - Participant EDML files 357

42 Customizing Dreamweaver The value of the internaltype attribute for the new document type must be DWTemplate. The dynamicid attribute must be set

Página 358 - <updatePatterns>

420 ComponentstoolbarControls()AvailabilityDreamweaver MX.DescriptionEvery component type returns a list of toolBarButtonRec objects, which represents

Página 359 - <updatePattern>

Components panel API functions 421ExampleThe following example assigns properties to the toolbar buttons:function toolbarControls(){var toolBarBtnArra

Página 360

422 ComponentsminusButton.command = "clickedDelete()";minusButton.enabled = "(dw.serverComponentsPalette.getSelectedNode() != null &

Página 361 - <delete> attributes

42319CHAPTER 19Server ModelsServer models are the technologies that run scripts on a server. When users define a new site, they can identify the serve

Página 362 - <translator>

424 Server ModelsThe Server Model API functionsThis section describes the functions that configure server models for Dreamweaver.canRecognizeDocument(

Página 363 - <translations>

The Server Model API functions 425getFileExtensions() AvailabilityDreamweaver UltraDev 1, deprecated in Dreamweaver MX.DescriptionReturns the document

Página 364 - <translation>

426 Server ModelsThe getLanguageSignatures() function returns a map of these signature declarations. Extension developers can use this map to generate

Página 365 - Participant EDML files 365

The Server Model API functions 427DescriptionThis function returns a JavaScript object that can be accessed from within the JavaScript code. You can r

Página 366 - <openTag>

428 Server ModelsIf you want a file in the ServerFormats folder to apply only to a specific scripting language, add the following statement so it is t

Página 367 - <attribute>

The Server Model API functions 429ArgumentsNone.ReturnsDreamweaver expects an array of objects where each object contains the following three properti

Página 368 - <closeTag>

Extensible document types in Dreamweaver 43Document extensions and file typesBy default, Dreamweaver shows all the file types it recognizes in the Fil

Página 369 - Server behavior techniques

430 Server ModelsDescriptionThis function returns the folder name to use for this server model within the Configuration folder. You can access this va

Página 370 - 370 Server Behaviors

The Server Model API functions 431ArgumentsNone.ReturnsDreamweaver expects an array of version objects, each with a version name and version value, as

Página 371

432 Server Models

Página 372 - 372 Server Behaviors

43320CHAPTER 20Data TranslatorsData translators translate specialized markup—server-side includes, conditional JavaScript statements, or other code su

Página 373 - Search pattern resolution

434 Data TranslatorsHow data translators workDreamweaver handles all translator files the same way, regardless of whether they translate entire tags o

Página 374 - Updating server behaviors

Adding a translated attribute to a tag 435Determining what kind of translator to useAll translators must contain the getTranslatorInfo() and translate

Página 375

436 Data TranslatorsThe mmTranslatedValue attribute must be unique within the tag. If it is likely that your translator needs to translate more than o

Página 376 - Deleting server behaviors

Locking translated tags or blocks of code 437Inspecting translated attributesWhen server markup specifies a single attribute and the attribute is repr

Página 377

438 Data TranslatorsThe syntax of the XML tags is shown in the following example:<MM:BeginLock translatorClass="translatorClass" ¬type=&q

Página 378 - 378 Server Behaviors

Creating Property inspectors for locked content 439[<A TARGET="_top" HREF="/support/">support</A>][<A TARGET="

Página 379 - Data Sources

44 Customizing Dreamweaver3. Add a new line for each new file type. In capital letters, enter the filename extensions that the new file type can have,

Página 380 - How data sources work

440 Data TranslatorsAnother problem is inherent in inspecting translated content. When you call the dom.getSelection() function, the values that retur

Página 381 - How data sources work 381

Creating Property inspectors for locked content 441document.layers['timelayer'].document.timeForm.timefield.¬value = timeValue;}After you pa

Página 382 - A simple data source example

442 Data TranslatorsFinding bugs in your translatorIf the translateMarkup() function contains certain types of errors, the translator loads properly,

Página 383 - Creating the EDML file

A simple attribute translator example 4436. Add alert() statements in strategic spots throughout the translateMarkup() function so you can make sure y

Página 384 - Sources API functions

444 Data TranslatorsCreating the iconNext, you create the icon for Poco tags.To create the icon:1. Create an image file that is 18 x 18 pixels for the

Página 385

A simple attribute translator example 445// the conditional statementvar trueStart; // The beginning of the true casevar falseStart; // T

Página 386 - 386 Data Sources

446 Data Translators transValue = attName + '="' + trueValue + '"'; transAtt = ' mmTranslatedValue' +

Página 387

A simple block/tag translator example 447 returnArray[0] = "Pound_Conditional"; // The translatorClass returnArray[1] = "Pound Cond

Página 388 - Enter the following:

448 Data Translators * markup to be translated, the regular expressions that * * a document containing the markup to be translated * * would mat

Página 389 - Testing the new data source

A simple block/tag translator example 449 return ""; } // As long as start, which is equal to the location in inStr of the // KENT

Página 390 - 390 Data Sources

Extensible document types in Dreamweaver 45 <loadstring>myJSPDocType/Description</loadstring></description>or<description>

Página 391 - The Data Sources API

450 Data Translators //Assemble the lock tags and the replacement HTML. var replCode = start + ' depFiles="' + depFiles + '

Página 392 - 392 Data Sources

A simple block/tag translator example 451 // Now determine which photo to show based on whether it's a workday or a // weekend; what time i

Página 393 - The Data Sources API 393

452 Data Translators3. Save the file as kent.htm in the Configuration/Translators folder.The Data Translator APIThis section describes the functions u

Página 394

The Data Translator API 4537. The runDefault string specifies when this translator executes. The following list gives the possible string values: 8. T

Página 395 - The Data Sources API 395

454 Data TranslatorstransArray[11] = "50";return transArray;}translateMarkup()DescriptionThis function performs the translation.Argumentsdoc

Página 396

The Data Translator API 455liveDataTranslateMarkup()AvailabilityDreamweaver UltraDev 1.DescriptionThis function translates documents when users are us

Página 397

456 Data Translators

Página 398 - 398 Data Sources

45721CHAPTER 21C-Level Extensibility The C-level extensibility mechanism lets you implement Macromedia Dreamweaver 8 extensibility files using a combi

Página 399 - Server Formats

458 C-Level ExtensibilityThe readContentsOfFile() function accepts a list of arguments from the user, retrieves the filename argument, reads the conte

Página 400 - How data formatting works

C-level extensibility and the JavaScript interpreter 459The following example shows how the MM_Init() function for the library myLibrary might look:vo

Página 401 - How data formatting works 401

46 Customizing DreamweaverOpening a document in DreamweaverWhen a user opens a file, Dreamweaver follows a series of steps to identify the document ty

Página 402 - 402 Server Formats

460 C-Level ExtensibilityData typesThe JavaScript interpreter defines the following data types.typedef struct JSContext JSContextA pointer to this opa

Página 403 - The Server Formats API

The C-level API 461The C-level API The C-level extensibility API consists of the following functions:typedef JSBool (*JSNative)(JSContext *cx, JSObjec

Página 404 - 404 Server Formats

462 C-Level ExtensibilityArgumentschar *name, JSNative call, unsigned int nargs The name argument is the name of the function as it is exposed to Jav

Página 405

The C-level API 463ArgumentsJSContext *cx, jsval v, long *lp The cx argument is the opaque JSContext pointer that passes to the JavaScript function.

Página 406

464 C-Level Extensibility The bp argument is a pointer to a JSBool Boolean value. This function stores the converted value in *bp.ReturnsA Boolean va

Página 407 - Components

The C-level API 465 The vp argument is a pointer to the jsval structure into which the contents of the string should be copied.ReturnsA Boolean value

Página 408 - 408 Components

466 C-Level ExtensibilityJSVal JS_IntegerToValue()DescriptionThis function converts a long integer value to JSVal structure. Argumentslv The lv argum

Página 409 - Components panel files

The C-level API 467 Typically, this argument is passed in and converted using the JS_ValueToObject() function.ReturnsA pointer to a null-terminated s

Página 410 - Adding a service component

468 C-Level ExtensibilityJSBool JS_GetElement()DescriptionThis function reads a single element of an array object.ArgumentsJSContext *cx, JSObject *ob

Página 411 - Populating the tree control

The C-level API 469JSBool JS_ExecuteScript()DescriptionThis function compiles and executes a JavaScript string. If the script generates a return value

Página 412

Extensible document types in Dreamweaver 47<panelset>DescriptionOutermost tag, which signals the start of the panel set description.AttributesNo

Página 413

470 C-Level ExtensibilityReturnsA Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.File Access and Multiuser Configuration APIMacr

Página 414

File Access and Multiuser Configuration API 471There are many cases where JavaScript extensions open files and write to the Configuration folder. Java

Página 415

472 C-Level ExtensibilityFor example, if you use the trash can icon in the Snippets panel to delete a Snippets folder called javascript and a file cal

Página 416 - Dreamweaver MX

File Access and Multiuser Configuration API 473 The char *contstraints argument can be "files" or "directories" or a null value.

Página 417

474 C-Level Extensibilityint MM_OpenConfigFile()AvailabilityDreamweaver MX.DescriptionThis function opens the file and returns an operating system fil

Página 418

File Access and Multiuser Configuration API 475Example char *dwConfig = "file:///c|/Program Files/Macromedia/Dreamweaver/Configuration/Extensions

Página 419

476 C-Level ExtensibilityReturnsA Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure. Returns JS_FALSE if the file does not exist or

Página 420

File Access and Multiuser Configuration API 477Example char *dwConfig = "file:///c|/Program Files/Macromedia/Dreamweaver/Configuration/Extensions

Página 421

478 C-Level ExtensibilityJSBool MM_RemoveConfigFolder()AvailabilityDreamweaver MX.DescriptionThis function removes the folder and its files and subfol

Página 422 - 422 Components

Calling a C function from JavaScript 479ReturnsA Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.Example char dwConfig = "fi

Página 423 - Server Models

48 Customizing Dreamweaver<document>DescriptionSpecifies the Document window’s initial position and size.Attributesrect, maximize rect specifie

Página 424

480 C-Level ExtensibilityTo build the shared library on the Macintosh using Metrowerks CodeWarrior 9 or greater:1. Open Sample.mcp.2. Build the projec

Página 425

4814PART 4AppendixFind information about supporting files and reference resources that can aid in developing Macromedia Dreamweaver 8 extensions.Appen

Página 427

483APPENDIXThe Shared FolderThe Shared folder is the central repository for utility functions, classes, and images that are commonly used by all exten

Página 428 - "ASP/JavaScript"

484 The Shared FolderThe Common folderThe Common folder has shared scripts and classes for use in third-party extensions.CodeBehindMgr.js Contains fun

Página 429

The Shared folder contents 485GridControlClass.js Use this class to create and manipulate an editable grid. You add a special select list in your HTML

Página 430 - 430 Server Models

486 The Shared FolderThe MM folderThe MM folder contains the shared scripts, images, and classes used by the extensions that come with Dreamweaver, in

Página 431 - ADODB version 2.1

The Shared folder contents 487The Scripts folder also contains two subfolders, Class and CMN. The Class folderThe Class folder contains the following

Página 432 - 432 Server Models

488 The Shared FolderThe CMN folderThe CMN folder contains the following utility functions:GridControlClass.js Older version of the GridControlClass i

Página 433 - Data Translators

The Shared folder contents 489DOM.js Contains general helper functions for working with the Dreamweaver DOM. Includes functions that get the root node

Página 434 - How data translators work

Extensible document types in Dreamweaver 49 y specifies the top position of the panel group. Its value can be an integer or a value that is relative

Página 435

490 The Shared FolderOther foldersThe following list describes other folders of interest in the Shared folder: Controls The Controls folder contains

Página 436 - 436 Data Translators

Using the Shared folder 491Using the Shared folder Look first in the Dreamweaver Configuration/Shared/Common folder for useful extension code because

Página 437

492 The Shared Folder

Página 439

494 IndexbehaviorsAPI 312helper functions 307inserting multiple functions with 307required functions 312sample code 307user experience 306Behavi

Página 440 - 440 Data Translators

Index 495closeTag tag 368code coloringabout 63blockEnd tag 66blockStart tag 66brackets tag 67charEnd tag 68charEsc tag 68charStart tag 68comme

Página 441

496 Indexconventions, in this guide 13copyServerBehavior() 331css-support tag, code validation 92cssImport tag, code coloring 69cssMedia tag, code

Página 442 - 442 Data Translators

Index 497opening, procedure for 46tags in definition file 38document, opening 46documentEdited() 298documentElement property 131DOM. <italic&g

Página 443 - Creating the tagspec tag

498 Indexextensions, reloading 104, 105Extensions.txt file 43external JavaScript files 106Ffile (field) object 128file attribute 147, 235file t

Página 444 - Creating the icon

Index 499Iid attribute 144, 232idChar1 tag, code coloring 73idCharRest tag, code coloring 74identifyBehaviorArguments() 317ignoreCase tag, code c

Página 445

Contents 5Chapter 10: Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Site reports . . . . . . . . . . . . . . .

Página 446 - 446 Data Translators

50 Customizing Dreamweaver height is an integer that specifies the height of the panel in pixels. This attribute is optional. If height is not specif

Página 447

500 IndexMmanipulating tree control content 122math object 128menu command extensions, definition 100menu commandsabout 194sample code 197user ex

Página 448 - 448 Data Translators

Index 501Objects APIcanInsertObject() 161displayHelp() 161insertObject() 162isDomRequired() 162objectTag() 164windowDimensions() 165objectTag()

Página 449

502 IndexSsampleText tag, code coloring 77scheme block delimiter coloring 80scheme processingcode coloring 83escape characters 85maximum string le

Página 450 - 450 Data Translators

Index 503Ttag attribute 147Tag Chooser 268Tag Dialog extensions, definition 100Tag editor APIapplyTag() 276inspectTag() 275validateTag() 276Tag

Página 451

504 IndexUunescape() 128uninstalling 30update attribute 236updatePattern tag 359, 360updatePatterns tag 358URL property 131VvalidateTag() 276v

Página 452 - The Data Translator API

Extensible document types in Dreamweaver 51 id is a number that indicates the ID for the panel. The following table contains a list of values: visib

Página 453 - String Definition

52 Customizing DreamweaverContainerThis tag must be contained in a panelcontainer tag.Example<panelset><panelframe rect=”196 453 661 987” vis

Página 454

Extensible document types in Dreamweaver 53enabled="dw.getFocus(true) == 'textView' || dw.getFocus(true) == ¬'html'" com

Página 455

54 Customizing Dreamweaver

Página 456 - 456 Data Translators

552CHAPTER 2Customizing Code ViewMacromedia Dreamweaver 8 uses two devices in Code view that help you enter code quickly and make your code readable a

Página 457 - C-Level Extensibility

56 Customizing Code ViewDreamweaver cannot express some types of Code Hints menus through the XML file or the JavaScript API. Both the CodeHints.xml f

Página 458 - 458 C-Level Extensibility

Code hints 57<menugroup name="Tag Names" enabled="true" id="CodeHints_Tag_Names"><description> <![CDATA

Página 459 - MM_Init()

58 Customizing Code View<menugroup>DescriptionEach menugroup tag corresponds to a type of menu. You can see the menu types that Dreamweaver defi

Página 460 - Data types

Code hints 59AttributesNone.ContentsDescription text.ContainerThe menugroup tag.Example<description><![CDATA[ To add or remove tags and attri

Página 461 - The C-level API

6ContentsChapter 16: Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379How data sources work . . . . . . . . . . . . . . .

Página 462 - JSBool JS_ValueToInteger()

60 Customizing Code View The casesensitive attribute specifies whether the pattern is case-sensitive. The possible values for the casesensitive attri

Página 463 - JSBool JS_ValueToBoolean()

Code hints 61 The icon attribute, which is optional, specifies the path to an image file that Dreamweaver displays as an icon to the left of the menu

Página 464 - JSBool JS_StringToValue()

62 Customizing Code View The pattern attribute specifies the name of the function and its argument list. For methods, the pattern attribute describes

Página 465 - JSVal JS_BooleanToValue()

Code coloring 63Code coloringDreamweaver lets you customize or extend the code coloring schemes that you see in Code view so that you can add new keyw

Página 466 - JSVal JS_ObjectToValue()

64 Customizing Code View<tagColor id="CodeColor_HTMLTable" text="#009999" /><syntaxColor id="CodeColor_HTMLComment&q

Página 467 - JSObject *JS_NewArrayObject()

Code coloring 65Notice that the syntaxColor and tagColor tags in the Colors.xml file assign color and style values to an id string value. The id value

Página 468 - JSBool JS_SetElement()

66 Customizing Code ViewContentsblockEnd, blockStart, brackets, charStart, charEnd, charEsc, commentStart, commentEnd, cssProperty, cssSelector, cssVa

Página 469 - JSBool JS_ReportError()

Code coloring 67AttributescanNest, doctypes, id, name, scheme canNest Specifies whether the scheme can nest inside itself. Values are "Yes"

Página 470 - 470 C-Level Extensibility

68 Customizing Code View<charStart>DescriptionContains a text string that represents the delimiter of the start of a character. You must specify

Página 471

Code coloring 69AttributesNone.Example<commentStart><![CDATA[<%--]]></commentStart><commentEnd>DescriptionA text string tha

Página 472

Contents 7PART 4: APPENDIXAppendix: The Shared Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . 483The Shared folder contents . . . . .

Página 473 - JSBool MM_ConfigFileExists()

70 Customizing Code ViewAttributesname, id name="cssMedia_name" A string that assigns a name to the CSS @media function. id="id_str

Página 474

Code coloring 71<cssValue/>DescriptionAn empty tag that indicates CSS rules and holds code coloring attributes.Attributesname, id name="cs

Página 475

72 Customizing Code ViewExample<defaultTag name="Other Tags" id="CodeColor_HTMLTag" /><defaultText/> DescriptionOption

Página 476 - 476 C-Level Extensibility

Code coloring 73Attributesname, id name="entity_name" A string that assigns a name to the entity. id="id_string" Required. An

Página 477

74 Customizing Code View<idCharRest>DescriptionA list of characters that are to be recognized as the remaining characters in an identifier. If i

Página 478 - JSBool MM_DeleteConfigFile()

Code coloring 75<ignoreTags>DescriptionSpecifies whether markup tags should be ignored. Values are Yes and No; the default is Yes. Set to No whe

Página 479

76 Customizing Code View<keywords>DescriptionList of keywords for type specified in category attribute. Multiple keywords tags are allowed.Attri

Página 480 - 480 C-Level Extensibility

Code coloring 77Attributesname, id name="operator_name" A string that assigns a name to the list of operator characters. id="id_str

Página 481 - Appendix

78 Customizing Code ViewAttributesdoctypes doctypes="doc_type1, doc_type2,...” The document types for which this sample text appears.Example<

Página 482

Code coloring 79Attributesname, id, wrap name="stringStart_name" A string that assigns a name to the stringStart block. id="id_stri

Página 484 - The Common folder

80 Customizing Code View<tagGroup>DescriptionThis tag groups one or more tags to which you can assign a unique color and style.Attributesid, nam

Página 485

Code coloring 81Sample code<!-- #EndEditable --> <p><b><font size="+2">header</font></b></p> <!

Página 486 - The MM folder

82 Customizing Code ViewExample<blockStart doctypes="PHP_MySQL" scheme="outerTag"><![CDATA[<script\s+language="ph

Página 487 - The Class folder

Code coloring 83Scheme processingDreamweaver has three basic code coloring modes: CSS mode, Script mode, and Tags mode.In each mode, Dreamweaver appli

Página 488 - The CMN folder

84 Customizing Code ViewWildcard charactersThe following is a list of wildcard characters that Dreamweaver supports, along with the strings to specify

Página 489

Code coloring 85Escape charactersThe following is a list of escape characters that Dreamweaver supports, along with the strings to specify them and de

Página 490 - Other folders

86 Customizing Code ViewScheme precedenceDreamweaver uses the following algorithm to color text syntax in Code view:1. Dreamweaver determines the init

Página 491 - Using the Shared folder

Code coloring 87Editing schemesYou can edit the styles for a code coloring scheme either by editing the code coloring file or by selecting the Code Co

Página 492 - 492 The Shared Folder

88 Customizing Code ViewTo edit styles for a scheme using the Code Coloring category in the Preferences dialog box, double-click a document type, or c

Página 493

Code coloring 89Code coloring examplesThe following code coloring examples illustrate the code coloring schemes for a cascading style document and a J

Página 494 - 494 Index

9IntroductionThis guide describes the Macromedia Dreamweaver 8 framework and application programming interface (API) that lets you build extensions to

Página 495 - Index 495

90 Customizing Code ViewCSS sample textThe following sample text for the CSS scheme illustrates the CSS code coloring scheme:/* Comment */H2, .head2

Página 496 - 496 Index

Code coloring 91<searchPattern><![CDATA[=\s*/\e*\\/]]></searchPattern></regexp><idChar1>_$abcdefghijklmnopqrstuvwxyzABCD

Página 497 - Index 497

92 Customizing Code Viewvar tokens = new Array("Hello", "world");displayWords(tokens);The following lines from the Colors.xml file

Página 498 - 498 Index

Code validation 93ContentsThe property and value tags.ContainerNone.Example<css-support>. . .</css-support><property>DescriptionDefi

Página 499 - Index 499

94 Customizing Code View message="message_string" The message attribute defines a message string that Dreamweaver displays when it finds th

Página 500 - 500 Index

Changing default HTML formatting 95ContainerpropertyExample<property name="margin"><value type="units" name="ex"

Página 501 - Index 501

96 Customizing Code View

Página 502 - 502 Index

972PART 2Overview of Extending DreamweaverLearn the fundamental concepts of the Macromedia Dreamweaver 8 interface and how to extend Dreamweaver to su

Página 504 - 504 Index

993CHAPTER 3Extending DreamweaverTypically, you create a Dreamweaver extension to perform one of the following types of tasks: Automating changes to

Comentários a estes Manuais

Sem comentários