Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
16973 Visualizzazioni

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

 

Avatar
Abbandona

Hello ,

You get any solution because i am facing similar problem.

Risposta migliore

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
Abbandona
Risposta migliore

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

Avatar
Abbandona
Autore

yes tried that didn't work.

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 16
4350
0
lug 16
5214
1
dic 15
3782
1
nov 15
5200
1
gen 24
15777