Forum Moderators: not2easy
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.
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).
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.
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.
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.
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.
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...
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....
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.
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]
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....]
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...