Online Appendix D Setting HTML Preferences: File Types/Editors

If you're working on complicated pages or with sets of predesigned templates that need fine-tuning, you may find it easier to code HTML by hand. Or, you may just enjoy hand-coding.

As many shortcuts as Dreamweaver offers, sometimes it's just easier and faster to hand-write code than it is to figure out which button to push.

Whatever the case may be, if you find yourself hand-coding a page, you can employ your favorite HTML text editor (with shortcuts and macros of its own) and use it in conjunction with Dreamweaver.

Setting Up an External Editor

You can set up Dreamweaver to work with any HTML or text editor you have installed on your computer (see sidebar, this page). Mac users should review the upcoming sections about BBEdit Integration, which must be turned off if you choose a different editor.

To set up an external editor:

  1. From the Document window menu bar, select Edit > Preferences. The Preferences dialog box will appear.
  2. In the Category list at the left, select File Types/Editors. That panel will appear (Figure 19).
  3. In the External Code Editor section of the dialog box (Figure 20), click on Browse (Choose). The Select External Editor dialog box will appear (Figure 21).
  4. Browse through the files on your computer until you find the program file for the software you want to use, then select that file. On Windows, select the .EXE file. On the Mac, select the application file icon.
  5. Click on Open. You'll return to the Preferences dialog box, where you'll see the pathname for the editor displayed in the External Code Editor text box.
index | previous | next


 
Fig. 19  The CSS Styles panel of Dreamweaver's Preferences dialog box.


 
Fig. 20  Select an external editor by clicking on Browse.

 
Fig. 21  Select the application file for the external editor you want to use.

Tip

  • In Dreamweaver 4, you can edit script files, XML files, CSS files, and other text files in the Document window. If you'd rather work with a specific external editor, you can do so by setting it up in these preferences.

Other Editor Options

If you leave the other editor options alone, you'll be prompted as to whether to save your open file when opening the external editor. When you modify an open file using the external editor, you'll be prompted as to whether to have Dreamweaver reload the updated page in the Document window. You can choose Always, Never, or Prompt for both options (Figure 26).

To set external editor options:

If you prefer to be prompted as described, you can skip these steps entirely.

  1. Open the Preferences dialog box and set up your external editor, as described in the previous section.
  2. To have Dreamweaver reload files modified in the external editor without a prompt, select Always from the Reload Modified Files drop-down menu.
    To disable this function entirely, select Never.
  3. To have Dreamweaver save open files without a prompt when you launch the external editor, select Always from the Save on Launch drop-down menu.
    To disable this function entirely, select Never.
  4. When you're finished, click on OK to save your changes and return to the Document window.

Working with external editors

Once you've got an editor set up, how do you open it?

To launch an external editor:

  • From the Document window menu bar, select Edit > Edit With External Editor.
  • You can also simply open the page in the other editor. When you save your changes there, you'll be prompted to reload the page in Dreamweaver.


 
Fig. 26  You can have Dreamweaver reload files modified in another program, to prompt you when it does, or never to reload the files. You can set the same options for saving pages when you launch a document into an external editor from Dreamweaver.

 

 

 

 

 

Using BBEdit for the Mac

The Mac version of Dreamweaver ships with the latest version of BBEdit, the Mac user's long-standing favorite HTML editor.

Dreamweaver now offers BBEdit Integration features, including automatic update and simultaneous highlighting. The auto update synchronizes the documents in both programs, so when you make a change in one program, the open page is automatically updated in the other.

You've seen simultaneous highlighting at work in the Document window and the Code inspector: Select an object or some text in the Document window, and it's automatically selected in the Code inspector, and vice versa. With BBEdit Integration, the highlighting is extended to documents open in both programs.

To enable BBEdit Integration:

BBEdit Integration is available only for the Macintosh.

  1. From the Document window menu bar, select Edit > Preferences. The Preferences dialog box will appear.
  2. In the Category list at the left, select File Types/Editors.
  3. Check the BBEdit Integration checkbox.

Now, when you use BBEdit and Dreamweaver together, the features I described will be enabled.

Tip

  • To turn off BBEdit Integration, follow the steps above, and uncheck BBEdit Integration. You should turn off BBEdit Integration if you want to work with a different HTML editor, or if you prefer to work with an older (pre 5.0) version of BBEdit.