Setting the Snippets dialog box options

Setting the Snippets dialog box options

The purpose of this dialog box is to create or edit a code snippet for the Snippets panel.

To create or edit a code snippet:

  1. In the Name text box, enter a name for the snippet.
  2. (Optional) In the Description text box, enter a text description of the snippet. This makes it easier for other team members to use the snippet.
  3. For Snippet Type, select Wrap Selection or Insert Block.
  4. If you chose Wrap Selection, add code to the following text boxes:

    Insert Before Type or paste the code to insert before the current selection.

    Insert After Type or paste the code to insert after the current selection.

    To set default spacing for the blocks, use line breaks; press Enter (Windows) or Return (Macintosh) inside the text boxes.

  5. If you chose Insert Block, type or paste the code to insert.
  6. (Optional) Select a Preview Type: Code or Design.

    If you select Design, then Dreamweaver renders the code and shows it to you in the Preview pane of the Snippets panel. If you select Code, then Dreamweaver shows the code in the Preview pane.

  7. Click OK.

Related topics

  • Working with code snippets


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Setting Up Your Coding Environment
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly