Skip to Content
Menu
This question has been flagged
3 Replies
17083 Rodiniai

How to insert line break in placeholder in text area field?

 

Portretas
Atmesti

Hello ,

You get any solution because i am facing similar problem.

Best Answer

I am surprised no one came up with a working solution in the last 9 years.

You can simply add & # 1 0 ; (without spaces) to your placeholder text, browser will register it as line feed.

Portretas
Atmesti
Best Answer

Is it possible ?? ;) Have you tried \n \r ?

Portretas
Atmesti
Autorius

yes tried that didn't work.

Best Answer

Only by formatting with multiple spaces, e.g.:

1st line of placeholder starts here                                         2nd starts here            etc    

If the size of textarea is fixed, browsers will show such long texts as if they were on multiple lines.

You'll have to fine-tune the number of spaces to make placeholder text look as you like.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
liep. 16
4388
0
liep. 16
5268
1
gruod. 15
3852
1
lapkr. 15
5256
1
saus. 24
15850