code: function () {
            data = [];
            index = 0;
            self.typing = false;
            self.data = data;
            editor.fire('ClearUndos');
          }
docs: Removes all undo levels.
  
  @method clear