Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
17100 Vues

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

 

Avatar
Ignorer

Hello ,

You get any solution because i am facing similar problem.

Meilleure réponse

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
Ignorer
Meilleure réponse

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

Avatar
Ignorer
Auteur

yes tried that didn't work.

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
juil. 16
4390
0
juil. 16
5273
1
déc. 15
3858
1
nov. 15
5260
1
janv. 24
15860