Behave.js is a lightweight plugin that makes it fun to write code in textareas.

Ever wish to indent a block of lines in your text area?
Ever wish that textareas indent automatically?

Behave does just that.


  • No Dependencies
  • Custom Code/Behavior Fencing
  • Hard and Soft Tabs
  • Auto Open/Close Parenthesis, Brackets, Braces, Double and Single Quotes
  • Auto delete a paired character
  • Overwrite a paired character
  • Multi-line Indentation/Unindentation
  • Automatic Indentation

Practical Usage

Behave.js will be quite useful if you write a lot of code in blogs. Behave.js will also be useful when creating an application like “pastebin“

Browser Compatibility

Behave works with most browsers, even IE6.

Browser Versions
Internet Explorer IE6 +
Firefox 8+
Safari 4+
Chrome 10+
Opera 12+

Requirements: None
License:: MIT