How to break TextArea text into lines
| From: | Anas Mughal | Date: | Sat, 09 Dec 2000 01:15:48 +0000 |
| Subject: | How to break TextArea text into lines | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29436@lists.php.net to get a copy of this message | ||
Hi,
I am having this problem with TEXTAREA text that I can't find an easy
solution to.
I tried different settings for the WRAP attribute. With WRAP="PHYSICAL", the
form wraps the text with appropriate line breaks (no long continuous line).
However, when the form is sent back to my form handler, no information about
those line breaks are transmitted. (Please note that I don't expect the
users to enter any line breaks. Users are expected to enter one long
paragraph.)
Now, my form handler has to figure out a way to break these long text lines
into presentable lines (e.g. max of 70 columns each). I can't do that in any
easy way because TEXTAREA doesn't pass me any information about reasonable
line breaks.
So, it seems like my only option is to write a method that would take this
text and attempt at breaking them at whitespaces. I would really appreciate
if someone has written a similar method and would like to share it with me.
Thank you very much for your assistance.
--
anas mughal
P.S. Sorry about the length of this message.