No - I don't want to use a textarea.
I want to style an text input to basically look like a textarea. Thus I want it to break text instead of extend horizontally.
Why? I want to disallow line breaks in user input and I want to avoid to implement javascript which disallows return, removing line breaks from pasted content and other possible hacks.
No. It is not possible to wrap text in an input as a standard feature.
If you manage to hack it, that would be invalid HTML.
HTML5 spec:
4.10.5.1.2 Text (
type=text
) state and Search state (type=search
)The
input
element represents a one line plain text edit control for the element's value.(emphasis mine)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With