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?
They use an HTML editor called WMD Markdown Editor.
$(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);
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With