Skip to main content

A JupyterLab extension to colour notebook cell backgrounds.

Project description

Toolbar Item

This example shows how to add a button to the notebook toolbar.

Toolbar button

In this particular example, the button will clear all cell outputs.

If the wanted action is already defined as a command like in this case, you will not need to add any code. Otherwise you will need to add a new command.

Actually you can do this by updating your user settings.

To add a button triggering a command to the notebook toolbar, you must specified the following settings:

// schema/plugin.json#L2-L9

"jupyter.lab.toolbars": {
  "Notebook": [
    {
      "name": "clear-all-outputs",
      "command": "notebook:clear-all-cell-outputs"
    }
  ]
},

The key Notebook inform JupyterLab about which widget toolbar should be extended. The name should be an unique identifier for the widget toolbar items. The command is the unique command identifier. For JupyterLab core commands, you can look at that list to find it.

Where to Go Next

This example uses a command to display the widget. Have a look a the commands example for more information about it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page