Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
16881 Vistas

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

 

Avatar
Descartar

Hello ,

You get any solution because i am facing similar problem.

Mejor respuesta

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
Descartar
Mejor respuesta

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

Avatar
Descartar
Autor

yes tried that didn't work.

Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 16
4263
0
jul 16
5173
1
dic 15
3718
1
nov 15
5185
1
ene 24
15701