![]() |
< Day Day Up > |
![]() |
2.2 Copying and Pasting TextIf you're building Web sites as part of a team or for clients, your writers are likely to
send you their copy in the form of word-processing documents. If the text comes in
a Microsoft Word document or Excel spreadsheet, you're lucky. Dreamweaver MX
2004 includes new commands for pasting text from these two types of files. If you're
using Windows, you can even import those kinds of files directly into a Web page
using File 2.2.1 Simple Copy and PasteFor non-Microsoft-spawned text, you can, of course, still simply copy and paste like generations of Web designers before you. Open the document in whatever program created it梂ordPerfect, AppleWorks,
your email program, or whatever. Select the text you want (by dragging through
it, for example), or choose Edit When you copy from any program other than Microsoft Word or Excel, as shown at top, and paste into Dreamweaver, as shown at bottom, all formatting is lost, and paragraph breaks are replaced by line breaks. The little icon that appears at the end of the first line at right represents the invisible line break.![]() This routine pastes the text into place. Unfortunately, you lose all text formatting (font type, size, color, bold, italic, and so on) in the process, as shown in Figure 2-3. Furthermore, you may find that pasted paragraphs are separated by line break characters, not standard carriage returns. Strangely enough, this means that when you paste in a series of paragraphs, Dreamweaver treats them as though they were one gargantuan paragraph. These line break characters can pose problems when trying to format what you think is a single paragraph. To identify these line breaks, see the note in Section 2.1.1.1. 2.2.2 Pasting Text from Word: The Basic MethodOne of the most frustrating things about earlier versions of Dreamweaver was their inability to maintain basic formatting, like bold and italics, when copying and pasting from Microsoft Word. Worse, even simple paragraphs would sometimes be merged into a single glob. But no more! Dreamweaver MX 2004 now includes both basic and advanced methods of copying and pasting Word text. You can even paste spreadsheet information from Excel, complete with rows, columns, and cells. Frequently, you'll just want to preserve basic formatting like bold or italic text, headlines, and bulleted lists. You won't need (and in most cases, won't want) more extravagant formatting like different fonts, colors, or margin settings. After all, you're the Web designer, and you'll use your own design sense梐nd Dreamweaver's CSSbased formatting tools梩o add beauty to basic text. Pasting Word text works like any copy/paste action described in the previous section.
Just select the text in Word, copy it, switch to Dreamweaver, and then choose Edit
NOTE
There are a couple of caveats with this feature. First, you can't copy and paste more than 300 K worth of text, so you have to transfer really long documents in pieces (or better yet, spread them out among multiple Web pages). And second, this feature only works with versions of Word later than Office 97 (for Windows) or Office 98 (for Mac). Dreamweaver MX 2004 now lets you paste Word text (and graphics)條ike the contents of the Word file at top梚nto a Web page while preserving basic formatting options like headlines, italics, paragraphs, and bold (bottom left). The Paste Formatted command lets you preserve more advanced formatting such as font faces, colors, sizes, and margins (bottom right). But this special treatment comes at a price: the file size of the page on the right is about 10 percent larger than the one on the left.![]() 2.2.3 Pasting Text with Word FormattingIf you simply must keep that three-inch tall, orange text and crazy cartoon-like font, you can turn to another new Dreamweaver MX 2004 feature桺aste Formatted. After copying text from Word and returning to Dreamweaver, choose Edit Unfortunately, all of this extra code increases the document's file size and download time and can interfere with future formatting changes. What's worse, most of your visitors won't even be able to see some of this formatting梥uch as uncommon font faces. For these reasons, use this feature with caution. 2.2.4 Pasting Excel Spreadsheet InformationDreamweaver MX 2004 offers two methods of pasting information from Microsoft
Excel, too: a basic method, using the standard Ctrl+V ( But unlike pasting from Word, the basic Paste command from Excel preserves no formatting: it doesn't even hang on to bold and italics. The Paste Formatted command, however, preserves advanced formatting like font, font size, text color, and cell background colors. Strangely, though, this command only retains formatting applied to an entire cell in Excel. If you use Paste Formatted on an entire cell of bolded text?UFO Sightings Since 1996"梩he text does remain bold. But if you've included a combination of plain and italicized text in one cell?Ad Sales Data for The National Exasperater," for example?span class="docEmphasis">none of the italicized text will appear italicized in Dreamweaver. Kind of confusing? It certainly is, so you'll need to closely check any Excel data you paste into a Dreamweaver document. It may require some fine-tuning to make it look just right. NOTE
To make matters worse, even if you just use your basic Edit 2.2.5 Importing Word and Excel Documents (Windows)Windows fans can also import material directly from a Word or Excel file into any
Dreamweaver document. Just place the cursor where you wish to insert the text or spreadsheet, and then choose File Dreamweaver captures the information just as if you'd used the Edit |
![]() |
< Day Day Up > |
![]() |