The CoffeeScript/JavaScript will be very simple, just init the editor
define [
"jquery",
"MathJaxMarkdownEditor"
], ($, Editor) ->
editor = new Editor()
jQuery ->
editor.init()
The HTML will look like
<textarea name="editor" id="editor"></textarea>
<div id="editor-preview"></div>
<div id="editor-buffer"></div>
The Editor will listen to keyup events of #editor
. When that happens there will be a small delay before the actual update or re-render. Updates will be done in buffer which is the swapped with preview. Buffer will be hidden while preview shown