I just finished a little script to use in textareas that maintains bullet lists, numbering and code indentation when starting a new line.

When the return key is pressed, it checks if the line is either a bullet, numbered list or a code block and then inserts a new line with the correct indentation and bullet. When you press return on an empty line, it clears the indentation you can resume regular text input.

I know this will save me some time, and hope it will for you too.

Blog Post
Demo
Github

http://www.tuesdayscoming.com/30-Mar-2012/JavaScript-Markdown-Helper