Forum Moderators: not2easy

Message Too Old, No Replies

Broken lines/paragraphs: how to correct them?

         

picophd

3:41 pm on Dec 6, 2004 (gmt 0)

10+ Year Member



Greetings,

I hope that this is indeed the best place to ask this question. Even though I'm not computer newbie at all, this problem has always been bugging me and I never really had any chance to read about a solution somewhere or get advice from someone about it.

Basically, do you know this effect when you're like typing a certain article or readme file or something in Notepad, for instance? Then when you maximize the window, the lines do NOT stretch with the window? Then when you copy and paste that stuff anywhere, the paragraphs have these breaks, even <br /> in them or something. Now how do I correct this problem in any body of text? Can MS Word be used to correct this problem? Or even better, is there a solution that does not depend on an MS product? And I definitely need to do this automatically, without manually correcting every parargraph.

Thanks for anyone taking the time to help and give tips and advice.

Stefan

4:11 pm on Dec 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm afraid that this won't be of much help, just curiousity prompting it.

Then when you maximize the window, the lines do NOT stretch with the window?

If you use carriage returns they won't though, right? Maybe I'm misunderstanding you there.

Then when you copy and paste that stuff anywhere, the paragraphs have these breaks, even <br /> in them or something.

I always use Notepad or Wordpad for writing pages, (no wordwrap), and if I copy and paste it, it moves exactly as it started, without the carriage returns breaking lines with a <br>. I've never seen what you're talking about. Do you really see this in Notepad? Not sure what you mean by paragraphs either. For me a paragraph is <br><br> in the html code, (which I put there myself).

picophd

4:34 pm on Dec 6, 2004 (gmt 0)

10+ Year Member



No, I don't manually insert a carriage return. I'm also referring to a proper, continuous paragraph. Just a few sentences following each other like this one, without any returns or enters. It usually starts with <p> in the code and ends with </p>

So yes, I do get this problem in some .txt files in Notepad. I'd find that there are paragraphs, the lines of which do not stretch as I stretch the window of the Notepad. This may not be a problem, but when I copy and paste that text in a WYSIWYG program like Dreamweaver, the text does not make up a solid, continuous paragraph, but sentences with breaks in the end, of the <br> or <br /> sort if you're using XHTML.

I know that if I paste the code inside the code view, then wrap the lines with the <p> and </p> tags, then it doesn't matter if there are any carriage returns in that text, it still shows up correctly. But the problem is when there are several paragraphs to paste. If I paste in the code, then it becomes very tedious to wrap every paragraph manually with the <p> and </p> tags. If I paste in the WYSIWYG view, then the paragraphs are splattered with all those <br /> tags.

Hope that explains the problem in detail.

If anyone knows of a better board to post this problem, please tell me. Thanks.

vkaryl

2:07 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The better way is probably to not use DW. I use notepad to produce whole BOOKS of text for websites, and using TopStyle Pro have absolutely no problem such as you describe. Anything I write in notepad can be moved exactly as written to TSP without the editor adding extraneous code or removing necessary code.

If NOT using DW isn't an option, have you tried using the <pre></pre> tagset on what you write in notepad? I don't KNOW that that would fix the problem, but you might give it a shot.

picophd

2:27 am on Dec 7, 2004 (gmt 0)

10+ Year Member



Using the <pre> tag would probably give the same exact effect as pasting the stuff I take from Notepad into Dreamweaver. Simply because Dreamweaver puts the <br /> tags so that it can imitate what the paragraphs look like from Notepad. So if I put the paragraphs in <pre> it will simply not put any <br /> but it will still show the text just like it came from Notepad, with lines that break, and when you maximize Notepad, the lines do not stretch.

Besides, if I'm gonna put <pre> tags, then I might as well put <p> tags and get the effect that I want, but the problem is that I want an automated solution that can correct the whole problem that happens in Notepad, and sometimes even in MS Word.

vkaryl

3:04 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yah - I just tried it a bit ago, you're right. Bummer. Well, you'll just have to use a better editor then.

pageoneresults

3:17 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If I'm not mistaken, the only thing Notepad knows is <br>. Anytime you paste into Notepad from another application and there was formatting, Notepad is going to strip that formatting, left justify everything and leave you with <br> or <br><br> in place of line breaks and/or paragraphs.

And no, <br><br> is not a paragraph break. At least not from a semantic standpoint. From a presentational (visual) standpoint, yes. I remember years ago, I was in the same camp. A double <br><br> to split my paragraphs and I was good to go. That was until I found the W3C and all the code geeks here at WebmasterWorld.

I use Notepad every day. Cut from original, paste into Notepad, cut from Notepad, paste into FrontPage. From there I perform my semantic formatting using the WYSIWYG interface of FP along with CSS. It takes about 5-10 minutes to format a page and that is all relative to the amount of content and formatting required. It could take a minute.

vkaryl

3:23 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



True, por. But I don't have any trouble at all moving text produced first in notepad into TSP - which formats it just the way it began. Line breaks where there should be line breaks, paragraphing intact. It's not notepad, it's what the secondary editor does with what notepad produces....

pageoneresults

3:29 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's not notepad, it's what the secondary editor does with what notepad produces.

Ah, that is an eye-opener, I didn't know that. I thought Notepad was pure text and <br>s, nothing else. You mean to tell me that it will hold formatting? After all these years cutting, pasting and reformatting. I would have had to do it anyway, oh well, no loss.

And here I've been using Notepad almost daily and use it strictly as a cut and paste go between. Hmmm...

vkaryl

3:53 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm speaking purely from use of notepad with TSP. And that's what happens with that pair. I write sentences and paragraphs in notepad. ctrl-a, ctrl-c, ctrl-v into TSP, and all I have to do is tweak for "look", not format.

I've never yet had a problem such as the original poster describes - EXCEPT when trying same with DW. Which is a horse of a whole other color. I had the "bright idea" of the <pre> trick, then started DW to try it, only to find that it didn't work.

Oh - actually, the copy n paste from notepad to editor ALSO worked just fine with my previous editor, the now totally antique and outdated WebEdit Pro 3.11. So to me that means that notepad doesn't have a problem except with programs that think they're smarter than you are - such as DW and FP.

But then, I'm well known as a DW/FP detractor. So you may take this for what it's worth in coin of the realm....

picophd

4:04 am on Dec 7, 2004 (gmt 0)

10+ Year Member



Maybe I didn't explain myself very well. I can totally forget that I have Dreamweaver or that it exists.

My problem is that the paragraphs break in Notepad, even sometimes in MS Word. And by breaking I mean that I would, for example, enlarge the size of the window itself, and the lines of the paragraphs do not stretch with the window of Notepad. The same 5, 6, or 7 words in each line remain as they are, they do not become 10, 11, or 12 words. I want a way to automate the correction of this problem, where many paragraphs are like this, looking as if I had pressed enter after a certain number of words, but in reality I never pressed any enters excepts twice after every paragraph. Again, all this is solely in Notepad.

createErrorMsg

4:08 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I paste in the WYSIWYG view, then the paragraphs are splattered with all those <br /> tags.

picophd, it sounds like you're cutting from Notepad and then pasting into the "Design View" side of DW. If so (and I'm only speculating here), DW is probably taking the carriage returns and converting them to <br /> tags. This is, after all, what a WYSIWYG editor is for, to take the text you enter in a visual way and convert it to browser readable (barely, but, of course, that's another discussion) code that will reproduce the visual effect you entered.

This would explain why entering the code into "Code View" and wrapping it in <p> tags works how you want. From Design View, DW is attempting to replicate your input, which is text with line breaks.

I would start by making sure you have word wrap turned off in your text editor. With wrap turned off, the text of one paragraph should be on only one line. You can activate word wrap while writing, then turn it off before clipping out the text to paste into DW. This may 'cure' the problem. If a paragraph takes up more than one line in your text editor with word wrap turned off, that's going to convert to a line break in the WYSIWYG.

Also, consider downloading and using Notepad2 instead of Notepad. It's a far more powerful, far more feature-rish version.

cEM

[added]
We posted almost simultaneously. based on your last post, you can pretty much disregard my first two paragraphs. Still check to be sure word wrap is off, though. What you describe IN Notepad is text with wordwrap on. What you describe in DW COULD be pasting word wrapped text into Design View (although, technically, cutting from Notepad shouldn't bring line breaks with it).
[/added]

[edited by: createErrorMsg at 4:12 am (utc) on Dec. 7, 2004]

vkaryl

4:11 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah. Yes, I misunderstood.... thanks for the clarification....

Yes, that's a built-in "function" in notepad. That's just how it works. You can get more "words before line wrap" or whatever by using notepad maximized, which is how I always open it.

You might look into notepad2 (just search for it) and use it instead.

[Ack! cEM beat me to it....]

pageoneresults

4:13 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



picophd, I understand what you are describing. This happens for example when cutting from an email where the original sender had their preferences set to wrap text at what is it, 72 characters or something like that. When you paste into Notepad, the lines break at or before that character count and a <br> is usually present at the end of each line. The only way I've been able to get around this is to use FP and it's Remove Formatting command. Or, I do it manually in Notepad.

P.S. I'm embarassed that I don't know more about Notepad being a regular user of it. For years I've used it strictly to strip formatting from content so I could reformat in FrontPage. Or, I'll hand code sections of html markup in Notepad and paste into FP.

<edit>By George, I think I've got it all backwards! Here I thought Notepad was producing the <br>s and it is FP that is formatting based on a visual presentation as mentioned above. Doh! Arrrggghhh! Tail between legs...

pageoneresults

4:34 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



picophd, wow, do I feel jilted! Here I've been chugging along not even giving a second thought to what was happening between Notepad and FrontPage. I just downloaded Notepad2 and won't be participating in these topics again until I know what I'm talking about! ;) Great little program.