• Insert a new code cell above the active cell or in index 0 if the notebook is empty.

    Parameters

    • notebook: Notebook

      The target notebook widget.

      Notes

      The widget mode will be preserved. This action can be undone. The existing selection will be cleared. The new cell will the active cell.

    Returns void