|I have text input via a multipe line TextBox and onces I Server.HTMLEncode it, I need to add the <BR>s for linefeeds. In a specially flagged section though I will be using a < Pre > tag and it requires linefeeds instead of the <BR>s. There are no HTML tags in any of the text entered, just a special tag which I will replace with < Pre > section.
This is for my HintsAndTips.com site that I will FINALLY be launching tonight (and hopefully, people will like posting tips to share since there are only a couple at the moment ). When they post their tips I have to have a special section for things such as code that you do not want text wraping and handle this through a special tag people can use to enclose that section. It is replaced with a scrollable div and a pre tag (to be more compatible with old IEs or would just use the "white-space" css feature).
At the moment I have it replacing all the linefeeds with <BR>s and they look okay in the browser, but the < Pre > does not handle blank lines and stacks the lines on top of each other.
I will be providing a better method of composing tips in the near future, but just needed something to allow people to display text that is much wider then the area provided and a scrollable div works great for that. Kind of like on CP when someone does not format an article good and it takes three monitors to view it horizonally Did not want that happening
Here is an example of tip with the Pre section I was referring to:
Please excuse the home page at the moment, it will be created later tonight