Welcome to WebmasterWorld Guest from 54.225.2.178

Forum Moderators: open

Message Too Old, No Replies

Pasting code from Notepad to Dreamweaver, double spacing

dreanweaver double spacing text pasted from notepad

     
11:04 pm on Mar 9, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 4, 2005
posts:76
votes: 0


This may be ridiculously simple to resolve, but I'm at a loss:
When I copy text, particularly from a PHP script, then paste it into an empty code section of a new page in Dreamweaver for doing some basic editing, Dreamweaver is double spacing all the text.
It's maddening!

Here's a small example:

original text:

TABLE border=0 class=tab cellspacing=0 cellpadding=5 align=center>
<TR bgcolor="#dddddd">
<TD nowrap>Edit Material</TD>
<TD nowrap>ID</TD>
<TD nowrap>Number</TD>
<TD nowrap>Name</TD>
<TD nowrap>Unit</TD>
<TD nowrap>Length</TD>
<TD nowrap>Width</TD>
<TD nowrap>Height</TD>
<TD nowrap>Price</TD>
<TD nowrap>Comments</TD>
<TD nowrap>Delete</TD>

After paste:

TABLE border=0 class=tab cellspacing=0 cellpadding=5 align=center>

<TR bgcolor="#dddddd">

<TD nowrap>Edit Material</TD>

<TD nowrap>ID</TD>

<TD nowrap>Number</TD>

<TD nowrap>Name</TD>

<TD nowrap>Unit</TD>

<TD nowrap>Length</TD>

<TD nowrap>Width</TD>

<TD nowrap>Height</TD>

<TD nowrap>Price</TD>

<TD nowrap>Comments</TD>

<TD nowrap>Delete</TD>

Any help for this moron?
(me)

11:19 pm on Mar 9, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 23, 2003
posts:76
votes: 0


My guess as to why its happening (and it is only a guess) is that notepad has an carriage return/newline characters (\n\r) on the end of each line.

Then when you paste, dreamweaver is also putting those on the end too, so you end up with 2.

How you would solve that I'm not sure, may be play around with the settings in notepad wrap/nowrap or something?

2:27 pm on Mar 10, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 4, 2005
posts:76
votes: 0


Thanks for the comeback...
Tried that, no effect...still double spacing.
In fact, if I cut the same code from notpad and paste into this scrolling text box (on webmasterworld topic reply) it does the same thing. So, perhaps it is a problem with Notepad, not Dreamweaver.

The original text was created using Edit Plus.

I thought Notepad always stripped CR's.

3:15 pm on Mar 10, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 23, 2003
posts:76
votes: 0


Maybe paste it into word then look at the control characters - it might show you where the problem is?