Skip to content
WJunction - Webmaster Forum

Shift + Enter = New line in TextArea?

Status
Not open for further replies.

1 comment

How can i enable Shift + Enter = Newline in TextArea? (Javascript or Jquery code needed)

Code:
$("textarea").keydown(function(e){     // Enter was pressed without shift key     if (e.keyCode == 13 && !e.shiftKey)     {         e.preventDefault(); //Prevents default behavior     } });

Hope this solves your problem, please report back.
 
Status
Not open for further replies.

About the author

1
Established Member · Joined
257
Messages
8
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom