code: function editText(text) {
      var $newedit = editor.$edit.clone().val(text);
      editor.$edit.replaceWith($newedit);
      editor.$edit = $newedit;
      editor.$edit.on('keyup', editorUpdate);
    }
docs: replace text in editor using clone() firefox gotcha: undo key mutates content after nav-triggered $edit.val() assume that jquery takes care of removing keyup handler