techzzz
asked on
Convert line breaks from plain text into HTML formatted paragraphs
Hi...
How can I convert line breaks from plain text into HTML formatted paragraphs?
For example, if I have a text area field containing plain text with several paragraphs (or line breaks), how can I enclose each paragraph with <p></p> tags?
Then the resulting HTML formatted text would output to another text area field.
Thanks!
How can I convert line breaks from plain text into HTML formatted paragraphs?
For example, if I have a text area field containing plain text with several paragraphs (or line breaks), how can I enclose each paragraph with <p></p> tags?
Then the resulting HTML formatted text would output to another text area field.
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you provide a more complete example?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, I want to convert user input from a textarea field, and then output the new code to another textarea field.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Or, are you asking to convert the user input from a text, or textarea into HTML?
In which case, you want the javascript to surround the value with the <pre> tag for you.
Which is it?