code: function(event) {
  
          event.preventDefault();
  
          if (window.kelmu.data[id].undoStack[0][0] !== window.kelmu.data[id].stepNumber) {
            originalBegin(event);
          }
  
          window.kelmu.data[id].undoStackPointer = 0;
          window.kelmu.data[id].stepNumber = 0;
          window.kelmu.data[id].subStepNumber = 0;
  
          createAnnotations();
          if (window.kelmu.data[id].actions.updateEditor) {
            window.kelmu.data[id].actions.updateEditor(true, true);
          }
  
        }
docs: Functionality for begin button.