How to use the @jupyterlab/notebook.NotebookActions.undo function in @jupyterlab/notebook

To help you get started, we’ve selected a few @jupyterlab/notebook examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab-data-explorer / tests / test-notebook / src / actions.spec.ts View on Github external
it('should redo a cell action', () => {
        const count = widget.widgets.length;
        const next = widget.widgets[1];
        widget.select(next);
        NotebookActions.deleteCells(widget);
        NotebookActions.undo(widget);
        NotebookActions.redo(widget);
        expect(widget.widgets.length).to.equal(count - 2);
      });
github jupyterlab / jupyterlab / tests / test-notebook / src / actions.spec.ts View on Github external
it('should switch the widget to command mode', () => {
        widget.mode = 'edit';
        NotebookActions.undo(widget);
        expect(widget.mode).to.equal('command');
      });
github jupyterlab / jupyterlab / examples / notebook / src / commands.ts View on Github external
    execute: () => NotebookActions.undo(nbWidget.content)
  });
github yuvipanda / simplest-notebook / src / notebook / component.tsx View on Github external
      execute: () => NotebookActions.undo(nbWidget.content)
    });
github jupyterlab / jupyterlab / packages / notebook-extension / src / index.ts View on Github external
execute: args => {
      const current = getCurrent(args);

      if (current) {
        return NotebookActions.undo(current.notebook);
      }
    },
    isEnabled
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / notebook-extension / src / index.ts View on Github external
execute: args => {
      const current = getCurrent(args);

      if (current) {
        return NotebookActions.undo(current.content);
      }
    },
    isEnabled
github jupyterlab / jupyterlab / examples / notebook / src / index.ts View on Github external
    execute: () => NotebookActions.undo(nbWidget.notebook)
  });
github yuvipanda / simplest-notebook / packages / notebook-extension / src / index.ts View on Github external
execute: args => {
      const current = getCurrent(args);

      if (current) {
        return NotebookActions.undo(current.notebook);
      }
    },
    isEnabled