How to use the @jupyterlab/notebook.NotebookActions.clearAllOutputs 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 / tests / test-notebook / src / actions.spec.ts View on Github external
it('should clear the outputs on all cells', () => {
        const next = widget.widgets[1];
        widget.select(next);
        NotebookActions.clearAllOutputs(widget);
        for (let i = 0; i < widget.widgets.length; i++) {
          const cell = widget.widgets[i];
          if (cell instanceof CodeCell) {
            expect(cell.model.outputs.length).to.equal(0);
          }
        }
      });
github jupyterlab / jupyterlab-data-explorer / tests / test-notebook / src / actions.spec.ts View on Github external
it('should clear the outputs on all cells', () => {
        const next = widget.widgets[1];
        widget.select(next);
        NotebookActions.clearAllOutputs(widget);
        for (let i = 0; i < widget.widgets.length; i++) {
          const cell = widget.widgets[i];
          if (cell instanceof CodeCell) {
            expect(cell.model.outputs.length).to.equal(0);
          }
        }
      });
github yuvipanda / simplest-notebook / packages / notebook-extension / src / index.ts View on Github external
execute: args => {
      const current = getCurrent(args);

      if (current) {
        return NotebookActions.clearAllOutputs(current.notebook);
      }
    },
    isEnabled
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / notebook-extension / src / index.ts View on Github external
clearAll: (current: NotebookPanel) => {
      return NotebookActions.clearAllOutputs(current.content);
    }
  } as IEditMenu.IClearer);
github jupyterlab / jupyterlab / packages / notebook-extension / src / index.ts View on Github external
clear: (current: NotebookPanel) => {
      return NotebookActions.clearAllOutputs(current.notebook);
    }
  } as IEditMenu.IClearer);
github spyder-ide / spyder-notebook / spyder_notebook / server / src / commands.ts View on Github external
    execute: () => NotebookActions.clearAllOutputs(nbWidget.content)
  });
github jupyterlab / jupyterlab / packages / notebook-extension / src / index.ts View on Github external
          .then(() => { NotebookActions.clearAllOutputs(notebook); });
      }
github yuvipanda / simplest-notebook / packages / notebook-extension / src / index.ts View on Github external
return current.session.restart().then(restarted => {
        if (restarted) {
          NotebookActions.clearAllOutputs(current.notebook);
        }
        return restarted;
      });
    },
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / notebook-extension / src / index.ts View on Github external
return session.restart().then(() => {
          NotebookActions.clearAllOutputs(content);
        });
      }
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.clearAllOutputs(current.content);
      }
    },
    isEnabled