Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3 Respostas
16933 Visualizações

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

 

Avatar
Cancelar

Hello ,

You get any solution because i am facing similar problem.

Melhor resposta

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
Cancelar
Melhor resposta

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

Avatar
Cancelar
Autor

yes tried that didn't work.

Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jul. 16
4332
0
jul. 16
5203
1
dez. 15
3759
1
nov. 15
5191
1
jan. 24
15746