Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
16984 Переглядів

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

 

Аватар
Відмінити

Hello ,

You get any solution because i am facing similar problem.

Найкраща відповідь

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.

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

yes tried that didn't work.

Найкраща відповідь

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
лип. 16
4358
0
лип. 16
5219
1
груд. 15
3790
1
лист. 15
5210
1
січ. 24
15790