Topic awaiting preservation: Autoformatting textarea |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Juneau, Alaska |
posted 11-10-2004 22:19
I'm currently working on an application that allows the user to paste a press release into a textarea field and send it to a database. The unfortunate issue is that line breaks and paragraphs are not automatically inserted. Short of forcing my superiors to learn HTML, how can I convince the server to automatically interpret new paragraphs as <p>? |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 11-10-2004 22:50
php? |
Bipolar (III) Inmate From: |
posted 11-10-2004 22:55
Your best bet would be some simple regex with PHP. |
Bipolar (III) Inmate From: Juneau, Alaska |
posted 11-11-2004 00:04
Thanks for the suggestions. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 11-11-2004 12:50
aeh... you're using a regular textarea? These things should end up as \r\n (on windows machines) in your php scripts. |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 11-11-2004 19:05
A line break is \n not /n that could cause a problem if you are using a regex. |
Bipolar (III) Inmate From: Juneau, Alaska |
posted 11-12-2004 19:02
quote:
quote:
|