Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
3 Besvarelser
17065 Visninger

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

 

Avatar
Kassér

Hello ,

You get any solution because i am facing similar problem.

Bedste svar

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
Kassér
Bedste svar

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

Avatar
Kassér
Forfatter

yes tried that didn't work.

Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
jul. 16
4379
0
jul. 16
5252
1
dec. 15
3845
1
nov. 15
5249
1
jan. 24
15840