Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
16909 Weergaven

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

 

Avatar
Annuleer

Hello ,

You get any solution because i am facing similar problem.

Beste antwoord

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
Annuleer
Beste antwoord

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

Avatar
Annuleer
Auteur

yes tried that didn't work.

Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jul. 16
4296
0
jul. 16
5185
1
dec. 15
3737
1
nov. 15
5186
1
jan. 24
15721