How does Stack Overflow mirror what you're typing?
Question
Right now while I'm typing this there's the preview down below the editor. I would like to do something similar. How does Stack Overflow do this?
Solution
They use an HTML editor called WMD Markdown Editor.
OTHER TIPS
$(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);
});
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow