现在,当我输入时,编辑器下面有预览。我想做类似的事情。 Stack Overflow如何做到这一点?
答案 0 :(得分:8)
他们使用名为WMD Markdown Editor.
的HTML编辑器答案 1 :(得分:1)
$(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);
});
});