Options
All
  • Public
  • Public/Protected
  • All
Menu

Module notebook-extension

Index

Variables

Const commandEditItem

commandEditItem: JupyterFrontEndPlugin<void> = {id: '@jupyterlab/notebook-extension:mode-status',autoStart: true,requires: [INotebookTracker, ITranslator],optional: [IStatusBar],activate: (app: JupyterFrontEnd,tracker: INotebookTracker,translator: ITranslator,statusBar: IStatusBar | null) => {if (!statusBar) {// Automatically disable if statusbar missingreturn;}const { shell } = app;const item = new CommandEditStatus(translator);// Keep the status item up-to-date with the current notebook.tracker.currentChanged.connect(() => {const current = tracker.currentWidget;item.model.notebook = current && current.content;});statusBar.registerStatusItem('@jupyterlab/notebook-extension:mode-status', {item,align: 'right',rank: 4,isActive: () =>!!shell.currentWidget &&!!tracker.currentWidget &&shell.currentWidget === tracker.currentWidget});}}

A plugin providing a CommandEdit status item.

Const default

default: JupyterFrontEndPlugin<any>[] = [factory,trackerPlugin,tools,commandEditItem,notebookTrustItem,widgetFactoryPlugin,logNotebookOutput]

Export the plugins as default.

Const notebookTrustItem

notebookTrustItem: JupyterFrontEndPlugin<void> = {id: '@jupyterlab/notebook-extension:trust-status',autoStart: true,requires: [INotebookTracker, ITranslator],optional: [IStatusBar],activate: (app: JupyterFrontEnd,tracker: INotebookTracker,tranlator: ITranslator,statusBar: IStatusBar | null) => {if (!statusBar) {// Automatically disable if statusbar missingreturn;}const { shell } = app;const item = new NotebookTrustStatus(tranlator);// Keep the status item up-to-date with the current notebook.tracker.currentChanged.connect(() => {const current = tracker.currentWidget;item.model.notebook = current && current.content;});statusBar.registerStatusItem('@jupyterlab/notebook-extension:trust-status',{item,align: 'right',rank: 3,isActive: () =>!!shell.currentWidget &&!!tracker.currentWidget &&shell.currentWidget === tracker.currentWidget});}}

A plugin that adds a notebook trust status item to the status bar.

Generated using TypeDoc