Right now we use codemirror's JavaScript mode on the website but there's a JSX mode now so we should start using that instead.

var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
    rebaseHistArray(hist.done, from, to, diff);
    rebaseHistArray(hist.undone, from, to, diff);
  }
  
  function stopMethod() {e_stop(this);}
  
  function addStop(event) {
    if (!event.stop) event.stop = stopMethod;
    return event;
  }
  function e_preventDefault(e) {