Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
16927 Zobrazení

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

 

Avatar
Zrušit

Hello ,

You get any solution because i am facing similar problem.

Nejlepší odpověď

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.

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Autor

yes tried that didn't work.

Nejlepší odpověď

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.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 16
4332
0
čvc 16
5201
1
pro 15
3756
1
lis 15
5191
1
led 24
15741