Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Problem with word wrap in HTML view

Apologies if this has already been mentioned.

I've noticed as of CD 2.0.3 that if you type a load of text into the normal view then switch to html view, the text is put onto several lines (rather than just one long one). It does this even if the 'Word Wrap' menu item is switched off and in the teaser field too (as far as I can tell). What this actually does is put a bunch of line breaks into the generated HTML which is fine in most cases (browsers don't display them) but it's extremely annoying in others (such as when I'm using the contents of the teaser field to put into a text area on a form).

John C
Thursday, May 29, 2003

This is by design. When you create new text in WYSIWYG mode, the editor tries to generate reasonable HTML, and its definition of reasonable HTML is something without any lines that are too long and thus hard to edit.

Can you explain in more detail why it's annoying? Although, there's not too much we can do about it. It is a side effect of moving to the "source preserving" method of editing. In CD 1.0 this didn't happen because the editor always reformatted the heck out of all your text and wound up putting everything on a few really long lines, which EVERYONE thought was annoying.

Joel Spolsky
Thursday, May 29, 2003

I've got a mailing list php page that fires off the latest teaser to those crazy enough to be on the list along with a link. It puts the teaser (with line breaks) into a text area in a form that I then post, which generates the e-mail.

Now you mention it and I actually think about it you're right, the 2.0.3 way is best. Having all the html on a single line is a bit mad really and the html produced is far better. I'm just being lazy - I can simply strip out any carriage returns in the php page. What was I thinking? :-)

John C
Thursday, May 29, 2003

*  Recent Topics

*  Fog Creek Home