Change the selected cell type(s).
The target notebook widget.
The target cell type.
It should preserve the widget mode. This action can be undone. The existing selection will be cleared. Any cells converted to markdown will be unrendered.
Clear all the code outputs on the widget.
Clear the code outputs of the selected cells.
Collapse all cells in given notebook.
The target notebook widget.
Copy the selected cell(s) data to a clipboard.
The target notebook widget.
Deselect all of the cells of the notebook.
the target notebook widget.
Disable output scrolling for all selected cells.
The target notebook widget.
Duplicate selected cells in the notebook without using the application clipboard.
The target notebook widget.
the mode of adding cells: 'below' (default) adds cells below the active cell, 'belowSelected' adds cells below all selected cells, 'above' adds cells above the active cell, and 'replace' removes the currently selected cells and adds cells in their place.
The last pasted cell becomes the active cell. This is a no-op if there is no cell data on the clipboard. This action can be undone.
Enable output scrolling for all selected cells.
The target notebook widget.
Un-collapse all cells in given notebook.
The target notebook widget.
If given cell is a markdown heading, returns the heading level. If given cell is not markdown, returns 7 (there are only 6 levels of markdown headings)
The target cell widget.
Hide the code on all code cells.
The target notebook widget.
Hide the output on all code cells.
The target notebook widget.
Hide the code on selected code cells.
The target notebook widget.
Hide the output on selected code cells.
The target notebook widget.
Merge the selected cells.
The target notebook widget.
If only one cell is selected, indicates whether to merge it with the cell above (true) or below (false, default).
The widget mode will be preserved.
If only one cell is selected and mergeAbove
is true, the above cell will be selected.
If only one cell is selected and mergeAbove
is false, the below cell will be selected.
If the active cell is a code cell, its outputs will be cleared.
This action can be undone.
The final cell will have the same type as the active cell.
If the active cell is a markdown cell, it will be unrendered.
Move the selected cell(s) down.
= The target notebook widget.
Move the selected cell(s) up.
Paste cells from the application clipboard.
The target notebook widget.
the mode of adding cells: 'below' (default) adds cells below the active cell, 'belowSelected' adds cells below all selected cells, 'above' adds cells above the active cell, and 'replace' removes the currently selected cells and adds cells in their place.
The last pasted cell becomes the active cell. This is a no-op if there is no cell data on the clipboard. This action can be undone.
Redo a cell action.
Render not side-by-side.
The target notebook widget.
Render side-by-side.
The target notebook widget.
Replaces the selection in the active cell of the notebook.
The target notebook widget.
The text to replace the selection.
Run the selected cell(s).
The target notebook widget.
The optional client session object.
The last selected cell will be activated, but not scrolled into view. The existing selection will be cleared. An execution error will prevent the remaining code cells from executing. All markdown cells will be rendered.
Run all of the cells in the notebook.
The target notebook widget.
The optional client session object.
The existing selection will be cleared. An execution error will prevent the remaining code cells from executing. All markdown cells will be rendered. The last cell in the notebook will be activated and scrolled into view.
Run all of the cells before the currently active cell (exclusive).
The target notebook widget.
The optional client session object.
The existing selection will be cleared. An execution error will prevent the remaining code cells from executing. All markdown cells will be rendered. The currently active cell will remain selected.
Run all of the cells after the currently active cell (inclusive).
The target notebook widget.
The optional client session object.
The existing selection will be cleared. An execution error will prevent the remaining code cells from executing. All markdown cells will be rendered. The last cell in the notebook will be activated and scrolled into view.
Run the selected cell(s) and advance to the next cell.
The target notebook widget.
The optional client session object.
The existing selection will be cleared.
The cell after the last selected cell will be activated and scrolled into view.
An execution error will prevent the remaining code cells from executing.
All markdown cells will be rendered.
If the last selected cell is the last cell, a new code cell
will be created in 'edit'
mode. The new cell creation can be undone.
Run the selected cell(s) and insert a new code cell.
The target notebook widget.
The optional client session object.
An execution error will prevent the remaining code cells from executing.
All markdown cells will be rendered.
The widget mode will be set to 'edit'
after running.
The existing selection will be cleared.
The cell insert can be undone.
The new cell will be scrolled into view.
Select all of the cells of the notebook.
the target notebook widget.
Go to the last cell that is run or current if it is running.
Note: This requires execution timing to be toggled on or this will have no effect.
The target notebook widget.
If cell is a markdown heading, sets the headingCollapsed field, and otherwise hides the cell.
The cell to collapse / expand
Whether to collapse or expand the given cell
Set the given cell and ** all "child" cells ** to the given collapse / expand if cell is a markdown header.
The cell
Whether to collapse or expand the cell
The target notebook widget.
Set the markdown header level.
The target notebook widget.
The header level.
All selected cells will be switched to markdown. The level will be clamped between 1 and 6. If there is an existing header, it will be replaced. There will always be one blank space after the header. The cells will be unrendered.
Show the code on all code cells.
Show the output on all code cells.
The target notebook widget.
Show the code on selected code cells.
The target notebook widget.
Show the output on selected code cells.
The target notebook widget.
Split the active cell into two or more cells.
The target notebook widget.
It will preserve the existing mode. The last cell will be activated if no selection is found. If text was selected, the cell containing the selection will be activated. The existing selection will be cleared. The activated cell will have focus and the cursor will remain in the initial position. The leading whitespace in the second cell will be removed. If there is no content, two empty cells will be created. Both cells will have the same type as the original cell. This action can be undone.
Toggles the collapse state of the active cell of the given notebook and ** all of its "child" cells ** if the cell is a heading.
The target notebook widget.
Trust the notebook after prompting the user.
The target notebook widget.
a promise that resolves when the transaction is finished.
No dialog will be presented if the notebook is already trusted.
Undo a cell action.
Generated using TypeDoc
A namespace for
NotebookActions
static methods.