コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
16975 ビュー

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.

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 16
4350
0
7月 16
5214
1
12月 15
3785
1
11月 15
5200
1
1月 24
15778