How does stack overflow reflect what you're typing?

Right now, when I type this, you can view it below the editor. I would like to do something similar. How does stack overflow do this?

+4
source share
2 answers

They use an HTML editor called MarkD Markdown Editor.

+8
source
$(function(){ // whenever the text in the editor box changes: $("#editorTextArea").change(function(){ // add the text to the preview box below // this certainly involves some formatting/marking up of the text // but this is good enough for illustrative purposes $("#previewBox").val(this.value); }); }); 
+1
source

All Articles