Click the Commands menu, and then select the command from the list at the bottom of the menu in this example, Copyright.. Manage History Commands Click the Commands menu, and then clic
Trang 1514 Chapter 22
Using and Managing
History Commands
Run a History Command
Open the Web page you want to
run (apply) a Command
Click in the document where you
want to run the Command
Click the Commands menu, and
then select the command from the
list at the bottom of the menu (in
this example, Copyright)
Dreamweaver applies the
command at the insertion point of
the cursor
3
2
1
The History panel is one of those tools in Dreamweaver that many users don't take full advantage of Most designers use it as a tool for multiple undos While that's a fine way to use it (I love multiple undos), there's more to the History panel than that The History panel's job is to record all the actions you make in an open document, based on a user-defined number of steps, and lets you take multiple steps backwards with the use of the panel's slider Its real power, however, is the ability
to record, play, save, and reuse user-defined commands User-defined commands are great timesaving tools when you build complex Web sites and know that you'll do certain things over and over again For example, you might want to insert a copyright statement at the bottom
of each page We're not talking about a library item, just some simple italicized text That's just perfect for a command After you save steps
as a command, you can run, rename, or delete commands
2
1
3
From the Library of Wow! eBook
Trang 2Manage History Commands
Click the Commands menu, and
then click Edit Command List.
Select from the following options
in the Edit Command List dialog
box:
◆ Rename Select a command
from the list, and enter a new
name, if desired
◆ Remove Select a command
from the list, and then click the
Delete button.
Click Close to save your changes.
3
2
3 2
Did You Know?
You can get more commands Click the
Commands menu, and then click Get
More Commands Your browser opens
the Adobe Exchange, where you can
pick up hundreds of specific
com-mands (many for free)
Trang 3516 Chapter 22
If you need to quickly create a command for temporary use, such as your current working session, you can use the Start Recording and Stop Recording commands on the Commands menu The actions you take during the recording process are stored internally by
Dreamweaver and cannot be edited Dreamweaver stores only one recorded command at a time This means when you record a new mand, the old command is erased However, if you like a recorded com-mand, you can save it for future use
Recording Commands
for Temporary Use
Record and Play a Command for
Temporary Use
Open the Web page you want to
use for recording purposes
Click the Commands menu, and
then click Start Recording.
TIMESAVER Ctrl+Shift+X (Win)
or A+Shift+X (Mac) to start
recording
Perform the steps you want to
record ( the cursor changes to
indicate you’re recording)
When you’re done, click the
Commands menu, and then click
Stop Recording.
TIMESAVER Ctrl+Shift+X (Win)
or A+Shift+X (Mac) to stop
recording
To play back the recorded
command, click the Commands
menu, and then click Play
Recorded Command.
5
4
3
2
1
2 3 1
Did You Know?
You can save a temporary recorded
command Click the Commands menu,
click Play Recorded Command, select
the Run Command step in the History
panel, click the Save Steps button,
enter a name for the command, and
then click OK
From the Library of Wow! eBook
Trang 4By default, the History panel is set for a maximum of 50 undos Your first job is to determine whether 50 undo steps is enough (or too many), and modify the History panel by using the General category in the
Preferences dialog box You can set the number of history steps to any number between 2 and 9999 As the History panel records each step taken in the active document, it consumes memory and hard disk space The larger the number of history steps you specify, the more memory and hard disk space Dreamweaver consumes on your computer
Setting History Panel
Preferences
Define History Steps
Click the Dreamweaver (Mac) or
Edit (Win) menu, and then click
Preferences.
Click the General category.
Enter a numeric (2-9999) value into
the Maximum Number Of History
Steps box
Click OK.
4
3
2
1
4 2
3
Trang 5518 Chapter 22
Dreamweaver's Find and Replace is a powerful tool for searching for and changing HTML text, tags and their attributes within the document you are working on Conducting a simple find/replace on text allows you to search for a specific phrase, words or characters, and replace them The advanced text option allows you to search for and replace text strings inside or outside of a target tag with the specific criteria you want; this acts as a filter for the search
Using Advanced Find
and Replace for Text
Conduct an Advanced Text Find
and Replace
Open Dreamweaver (it is not
necessary to open a document)
Click the Edit menu, and then click
Find And Replace.
Select the following options from
the Find and Replace dialog box:
◆ Find In Click the list arrow to
look for the find text by the
desired area for the search
◆ Search Click the list arrow, and
then click Text (Advanced).
◆ Find Enter the text to search
◆ Replace Enter the text to
replace
◆ Tag Click the list arrow, click
Inside Tag or Not Inside, and
then select a target tag to look
for text in (to the right)
◆ Criteria Click the Plus (+)
button or the Minus (-) button
to add or remove search
criteria
When you add a criteria, click
to select what to look for in the
tag (With Attribute, Without
Attribute, or Containing, or Not
Containing), and then specify
the criteria you want
For example, with Attribute
chosen, the attribute is color,
and the equal sign was used to
indicate we're looking for a
specific color (990000)
3
2
1
3
From the Library of Wow! eBook
Trang 6Select from the following Find and
Replace options:
◆ Match Case Select to make the
Find text case sensitive
◆ Match Whole Word Select to
match whole words
◆ Ignore Whitespace Select to
treat all whitespace as a single
space for the purpose of
matching
◆ Use Regular Expression Select
to use string expressions to
help locate information
Click Find Next, Find All, Replace,
Replace All to perform the find
and replace
Click Close to end the Find and
Replace routine
6
5
4
4
6 5
Find all results
See Also
See “Finding and Replacing Text or
Code” on page 120 for information on
using the Find and Replace command
Did You Know?
You can repeat the last search.
Dreamweaver remembers your last
search So, if you close the Find and
Replace dialog box to do additional
editing, you can resume the prior
search Click the Edit menu, and then
click Find Again
Trang 7520 Chapter 22
When you need to find a specific tag within the document you are working on, you can use the advanced features in the Find and Replace dialog box The advanced options allow you to search for and replace specific tags inside or outside of a target tag with the specific criteria you want, including tag attributes In other words, you can set condi-tions that act as a filter for the search Searching the source code takes you into the code and stops at each occurrence of the search
Using Advanced Find
and Replace for Tags
Conduct a Specific Tag Find
and Replace
Open Dreamweaver (it is not
necessary to open a document)
Click the Edit menu, and then click
Find And Replace.
Select the following options from
the Find and Replace dialog box:
◆ Find In Click to look for the find
text by the desired area for the
search
◆ Search Click the list arrow, and
then click Specific Tag.
◆ Tag Click the list arrow, and
then select the tag to look for
from the list (to the right)
◆ Tag Criteria Click to select
what to look for in the tag (With
Attribute, Without Attribute, or
Containing, or Not Containing),
and then specify the criteria
you want
For example, with Attribute
chosen, the attribute is color,
and the equal sign was used to
indicate we're looking for a
specific color (990000)
◆ Criteria Click the Plus (+)
button or the Minus (-) button
to add or remove search
criteria
3
2
1
3
From the Library of Wow! eBook
Trang 8◆ Action Click to select from the
available actions to perform,
when a match is made
Select from the following Find and
Replace options:
◆ Match Case Select to make the
Find text case sensitive
◆ Match Whole Word Select to
match whole words
◆ Ignore Whitespace Select to
treat all whitespace as a single
space for the purpose of
matching
◆ Use Regular Expression Select
to use string expressions to
help locate information
Click Find Next, Find All, Replace,
Replace All to perform the find
and replace
Dreamweaver looks for the
specific tag and makes the change
you specify
Click Close to end the Find and
Replace routine
6
5
4
4
6 5
Find all results
See Also
See “Finding and Replacing Text or
Code” on page 120 for information on
using the Find and Replace command
Trang 9522 Chapter 22
If you create a complex search and want to use it again, you can save
it as a query, and use it over and over again When you save a query in the Find and Replace dialog box, Dreamweaver saves the file with the extension DWR After you save a query, you need to load (open) it before you can use it In addition to the DWR extension, some queries from older versions of Dreamweaver may use the extension DWG
Creating and Using a
Search Query
Create a Query
Click the Edit menu, and then click
Find And Replace.
Create a Find and Replace search
using any of the methods
described in the previous sections
Click the Save Query button.
Select a location for the query
(default: working site folder)
Enter a descriptive name for the
query
Click Save to record and save the
query
Use a Query
Click the Edit menu, and then click
Find And Replace.
Click the Load Query button.
Select the folder that contains the
query, and then select the query
file you want to use
Click the Open button to load the
query into the Find and Replace
dialog box
Perform the Find and Replace
5
4
3
2
1
6
5
4
3
2
1
3
4
3
2
Load Query button
From the Library of Wow! eBook