- 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 and Replacing
Dreamweaver’s Find and Replace feature can save you a lot of time, because you can automatically find and change text on a single page, in pages within a folder, on pages you select, or throughout your site. You can choose to change text in Design view, or search and change just in Code view.
Imagine that you have a company’s site with dozens of pages devoted to singing the praises of their premier product, the amazing WonderWidget. Then one day you get a call from your client letting you know that because of a trademark dispute, they have to rename the product WonderThing. Rather than opening each page and making one or more changes on each of them, just put Dreamweaver’s Find and Replace feature to work, and you’ll be done in just a few minutes.
The Find and Replace window
The Find and Replace window, which you open by choosing Edit > Find and Replace, or by pressing Ctrl-F (Cmd-F), will be the tool you use for changing text, as shown in Figure 4.33. Let’s look at some of the parts of this window.
- The Find in pop-up menu allows you to tell Dreamweaver the scope of the search. You can choose to find text in the Current Document (the default); Selected Text; Open Documents; in a Folder you select; in Selected Files in Site; or in the Entire Current Local Site.
- The Search pop-up menu lets you choose what kind of search you want to do. You can choose Text; Text (Advanced), which gives you additional search options; Source Code, which allows you to search in the HTML; or Specific Tag, which searches the contents of HTML tags that you select. The latter two options are covered later in this chapter.
- The Find field is where you enter the text you wish to find.
- The Replace field is where you enter the text you want to use to replace the found word.
- The Save Query button allows you to save searches for later use. This is great for instances where you create complex queries, so you don’t have to do all the work to set up the search again.
- The Load Query button allows you to retrieve a saved search.
- The Search options let you constrain your searches. “Match case” returns results with the same uppercase and lowercase letters as the text you entered in the Find field. “Match whole word” only finds the text if it matches one or more complete words. “Ignore whitespace” tells Dreamweaver not to pay attention to additional spaces, tabs, and non-breaking spaces. It’s on by default, and it’s usually best to leave it on. Finally, “Use regular expression” (covered later in this chapter) lets you use wildcard characters to construct extremely complex searches.
Figure 4.33 The Find and Replace dialog provides a lot of power for making quick changes on a single page, or throughout your site.