Allow user to type a paragraph using JavaScript

183 Views Asked by At

Is there a way to create a box that allows the user to type a paragraph into? I'm hoping to save the user's input.

2

There are 2 best solutions below

1
On

<textarea>Type your stuff here</textarea>?

Whitespace will be sent to the server, and presumably saved. However, to make it appear as such in the output:

<div style="white-space: pre-wrap">
Look at me!

See? No BR tags and yet I'm on a new line!

                    Also spaces. SPAAAAAAAAAAACE!
</div>
0
On
<form>
<textarea id="someid" rows="8" cols="40"></textarea>
</form>

Won't this work?