- Adding Text
- Cutting, Copying, and Pasting Text
- Dragging and Dropping Text
- Using Paste Special
- Applying Headings
- Applying Character Formats
- Applying HTML Text Styles
- Using Preformatted Text
- Adding Line Breaks
- Indenting Text
- Aligning Text (HTML Method)
- Working with Lists
- Setting List Properties
- Nesting Lists
- Inserting Special Characters
- Adding Automatic Dates
- Adding Horizontal Rules
- Finding and Replacing
- Finding Text with a Simple Search
- Performing Advanced Text Searches
- Finding and Replacing in Source Code
- Finding and Replacing with a Specific Tag
- Using Regular Expressions for Searching
- Checking Spelling
Finding Text with a Simple Search
Simple searches work pretty much the same way that they do in a word processor. Just enter the text you want to find and the text that you want to replace it with, and away you go. Of course, you don’t have to replace text; if you want you can just use the Find and Replace dialog to find text in one or more files.
To find text:
Choose Edit > Find and Replace, or press Ctrl-F (Cmd-F).
The Find and Replace dialog appears (Figure 4.33).
- From the Find in pop-up menu, choose one of the options for the scope of your search.
- From the Search pop-up menu, choose Text.
- In the Find field, type the word or phrase that you’re looking for.
Click the Find Next button.
Dreamweaver finds and highlights the found text. If the scope of the search included more than one page, Dreamweaver opens the first file the text was found within, and highlights the text. If the text isn’t found, you’ll get a message to that effect at the bottom of the Find and Replace dialog.
or
Click the Find All button.
Dreamweaver does the search, closes the Find and Replace dialog, and opens the Search tab of the Results panel (Figure 4.34).
Figure 4.34 The Search tab of the Results panel shows you the file name and matched text when you click the Find All button.
- If you clicked Find All in step 5, double-click one of the search results in the Results panel to open it and highlight the found text.
To find the next result:
-
Choose Edit > Find Next, or press F3 (Cmd-G).
Dreamweaver finds and highlights the next result of the search, without reopening the Find and Replace dialog.
To find and replace text:
Choose Edit > Find and Replace, or press Ctrl-F (Cmd-F).
The Find and Replace dialog appears.
- From the Find in pop-up menu, choose one of the options for the scope of your search.
- From the Search pop-up menu, choose Text.
- In the Find field, type the word or phrase that you’re looking for.
- In the Replace field, type the replacement word or phrase.
Click the Find Next button.
When Dreamweaver finds the text, it is highlighted.
Click the Replace button.
Dreamweaver replaces the found text with the contents of the Replace field.
or
Click Replace All.
Dreamweaver warns you that you cannot undo changes made in unopened files. Of course, you can undo changes in any open documents by choosing Edit > Undo. If you still want to make the changes, click Yes.
Dreamweaver searches through the entire scope of the search, replacing all occurrences of the found text. When it is done, you’ll see a message telling you how many changes it made.