BUEditor is a plain text area editing tool, primarily aimed at facilitating code writing. It allows you to insert markup using configurable buttons. It also has a preview button which allows you to switch between insert and preview mode without reloading the page.

Together with Ajax markup it can also be extented to work together with Textile and Markdown. However, it can only be configured to work with one text format at a time: #1040236: Better integration with Drupal's text formats and filters

Excellent documentation is available at the BUEditor home page