Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NotebookEditor

Hierarchy

  • NotebookEditor

Index

Properties

Readonly document

The document associated with this editor. The document will be the same for the entire lifetime of this editor.

Optional viewColumn

viewColumn: ViewColumn

The column in which this editor shows. Will be undefined in case this isn't one of the main editors, e.g an embedded editor, or when the editor column is larger than three.

Methods

changeKernel

  • Changes the Notebook's kernel. Thenable will resolve only after kernel change is complete.

    Parameters

    Returns Thenable<boolean>

clearAllOutputs

  • clearAllOutputs(): Thenable<boolean>
  • Clears the outputs of all code cells in a Notebook

    Returns Thenable<boolean>

    A promise that resolves with a value indicating if the outputs are cleared or not.

clearOutput

  • Clears the outputs of the active code cell in a notebook.

    Parameters

    Returns Thenable<boolean>

edit

  • edit(callback: (editBuilder: NotebookEditorEdit) => void, options?: { undoStopAfter: boolean; undoStopBefore: boolean }): Thenable<boolean>
  • Perform an edit on the document associated with this notebook editor.

    The given callback-function is invoked with an edit-builder which must be used to make edits. Note that the edit-builder is only valid while the callback executes.

    Parameters

    • callback: (editBuilder: NotebookEditorEdit) => void

      A function which can create edits using an edit-builder.

    • Optional options: { undoStopAfter: boolean; undoStopBefore: boolean }

      The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.

      • undoStopAfter: boolean
      • undoStopBefore: boolean

    Returns Thenable<boolean>

    A promise that resolves with a value indicating if the edits could be applied.

runAllCells

  • Kicks off execution of all code cells. Thenable will resolve only when full execution of all cells is completed.

    Parameters

    Returns Thenable<boolean>

runCell

  • Kicks off execution of a cell. Thenable will resolve only once the full execution is completed.

    Parameters

    • Optional cell: NotebookCell

      An optional cell in this notebook which should be executed. If no cell is defined, it will run the active cell instead

    Returns Thenable<boolean>

    A promise that resolves with a value indicating if the cell was run or not.

Generated using TypeDoc