Reputation: 938
I have a textarea that gets put into a DB on submission and then pulled into a td element elsewhere.
Pulling it back into a textarea it keep the original formatting. However it should go into a td but that ignores the carriage returns.
How can I get the content from a textarea into a td or perhaps another HTML element other than a form and retain at least the carriage returns?
Upvotes: 0
Views: 73
Reputation: 191789
Add the white-space: pre
or white-space: pre-wrap
style properties to the <td>
Upvotes: 0