2.3 Selecting Text

   

After you get text into your Dreamweaver document, you'll undoubtedly need to edit it. You'll delete words and paragraphs, move sentences around, add words, and fix typos.

The first step in any of these procedures is learning how to select text, which works much as it does in word processors. You drag across text to highlight it, or just click where you wish the selection to begin and hold down the Shift key as you click at the end of the selection. You can also use shortcuts like these:

  • To select a word, double-click it.

  • To select a paragraph, triple-click anywhere in it.

  • To select a line of text, move your cursor to the left of the line of text until the cursor changes from an I-beam to an arrow, signaling that you've reached the leftmargin selection strip. Click once to highlight one line of text, or drag vertically in this selection strip to select multiple lines.

  • While pressing Shift, use the left and right arrow keys to select one letter at a time. Ctrl+Shift ( figs/command.jpg -Shift) and the left and right arrow keys select one word at a time.

GEM IN THE ROUGH
Clean Up Word

From Word, you can save any document as a Web page, essentially turning a Word doc into HTML. The drawback to this method is that Word produces hideous HTML code. One look at it, and you'd think that your cat fell asleep on the keyboard.

The explanation: So that it will be able to reopen the document as a Word file when the time comes, Word injects reams of information that adds to the file size of the page. This is a particular problem with the latest versions Word, which add loads of XML and Cascading Style Sheet information.

Fortunately, Dreamweaver's Clean Up Word HTML command can strip out most of that unnecessary code and produce leaner Web pages. To use it, open the Word HTML file just as you would any other Web page: by choosing File Open. Once the file is open, choose Commands Clean Up Word HTML.

The Clean Up Word HTML dialog box opens; Dreamweaver automatically detects whether the HTML was produced by Word 97/98 or Word 2000/2001/2002/X/XP, and then applies the appropriate rules for cleaning up the HTML.


  • Ctrl+A ( figs/command.jpg -A) selects everything in the body of the pagetext, graphics, and all.

Once you've selected text, you can cut, copy, or delete it. To move text to another part of the Web page, or even to another Dreamweaver document, use the Cut, Copy, and Paste commands in the Edit menu. You can also move text around by dragging and dropping it, as shown in Figure 2-5.

Once copied , the text remains on your Clipboard and can be placed again and again (until you copy something else to the Clipboard, of course). When you cut (or copy) and paste within Dreamweaver, all of the code affecting that text comes along for the ride. If you copy a paragraph that includes bold text, for example, you'll copy the HTML tags both for creating a paragraph and for producing bold text.

NOTE

Not all of the formatting necessarily comes along for the ride. With Dreamweaver MX 2004's support for Cascading Style Sheets, most of your text formatting includes some CSS formatting, and unfortunately , cutting and pasting text from one document to another does not also copy the CSS code. So on some occasions, you may copy text from one document, paste it into another, and find that the formatting disappears. (You'll find more detail about this particular problem in Section 6.3.3.)

To delete any selection, press Delete or choose Edit Clear.

You can move a blob of selected text simply by dragging it to another location in the document window. Point to a spot inside your highlighted selection; the cursor changes from an I-beam to an arrow; you can now drag the selection. Let go of the mouse button to drop your selection at the spot indicated by the vertical bar, as shown here. This technique works with graphics and other objects you've selected in the document window, too. You can even move a copy of the selection by pressing Ctrl (Option) as you drag-and-drop.
figs/02_05.jpg


Dreamweaver MX 2004. The Missing Manual
Dreamweaver MX 2004: The Missing Manual
ISBN: 0596006314
EAN: 2147483647
Year: 2003
Pages: 191

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net