Adobe 38040334 - Dreamweaver CS3 User Manual page 322

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

See also
"Setting up a web application" on page 501
Work with code snippets
Code snippets let you store content for quick reuse. You can create, insert, edit, or delete snippets of HTML,
JavaScript, CFML, ASP, JSP, and more. You can also manage and share your code snippets with team members. Some
predefined snippets that you can use as a starting point are available.
Snippets that contain <font> tags and other deprecated elements and attributes are in the Legacy folder in the
Snippets panel.
Insert a code snippet
1
Place the insertion point where you want to insert the code snippet, or select code to wrap a snippet around.
In the Snippets panel (Window > Snippets), double-click the snippet.
2
You can also right-click (Windows) or Control-click (Macintosh) the snippet, and then select Insert from the pop-up
menu.
Create a code snippet
1
In the Snippets panel, click the New Snippet icon at the bottom of the panel.
Enter a name for the snippet.
2
Note: Snippet names can't contain characters that are invalid in filenames, such as slashes(/ or \), special characters, or
double quotes (").
3
(Optional) Enter a text description of the snippet. This makes it easier for other team members to use the snippet.
For Snippet Type, select Wrap Selection or Insert Block.
4
a
If you chose Wrap Selection, add code for the following options:
Type or paste the code to insert before the current selection.
Insert Before
Type or paste the code to insert after the current selection.
Insert After
To set default spacing for the blocks, use line breaks; press Enter (Windows) or Return (Macintosh) inside the text
boxes.
Note: Because snippets can be created as start and end blocks, you can use them to surround other tags and content. This
is useful for inserting special formatting, links, navigation elements, and script blocks. Simply highlight the content you
want to surround, then insert the snippet.
If you chose Insert Block, type or paste the code to insert.
b
5
(Optional) Select a Preview Type: Code or Design.
Renders the code and displays it in the Preview pane of the Snippets panel.
Design
Displays the code in the Preview pane.
Code
Click OK.
6
Edit or delete a code snippet
In the Snippets panel, select a snippet, and click the Edit Snippet button or the Remove button at the bottom of
the panel.
September 4, 2007
DREAMWEAVER CS3
315
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents