Jump to content

Obout cc1:Editor


ZeroShade

Recommended Posts

Are you referring to a web control in a ASP.NET application? If so, what web control is it? How does it render into HTML? Does it turn into a <textarea />? A <div />, <pre />, or <code />?

Link to comment
Share on other sites

Are you referring to a web control in a ASP.NET application? If so, what web control is it? How does it render into HTML? Does it turn into a <textarea />? A <div />, <pre />, or <code />?
Yes I am referring to a web control. It is a control made by obout inc. It doesn't turn into any of the tags you mentioned... but maybe I'm misunderstanding your question. It looks like your average control with ABC on it, text size, those types of things with a field inside for text... and it does wrap if somebody types normally. However, if someone were to just do this, "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"...... and so on so forth so that there are no spaces then it keeps going on that same line causing it to look really stupid when viewed. I just want to make it stupid proof. Is there something i can do in C#?
Link to comment
Share on other sites

Hmm, this is probably more work than is really needed, but you could do something like this:1) Split the message up into an array of strings. If you split the message on the spaces, then your array will have an array of words.2) Loop through all the words to see if any of them are longer than a pre-determined length - perhaps 30 characters.3) If the word is longer than 30 characters, put a break (<br />) or a newline (\n) character in the middle of it so that it wraps.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...