Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3 Antworten
16105 Ansichten

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

 

Avatar
Verwerfen

Hello ,

You get any solution because i am facing similar problem.

Beste Antwort

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
Verwerfen
Beste Antwort

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

Avatar
Verwerfen
Autor

yes tried that didn't work.

Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juli 16
3549
0
Juli 16
4667
1
Dez. 15
3259
1
Nov. 15
4673
1
Jan. 24
15206