I was wondering, how do the buttons above the textarea for questions and answers work?
What I mean is that upon a click on the button, the text in the textarea is modified, at exactly the position where the cursor is, or where some text is marked etc. How is that accomplished? Is that code downloaded from elsewhere, or was it developed for SO?
Also: The preview field reacts upon every keypress, is Markdown implemented in JavaScript?