An interface for using a RenderMime.IRenderer for output and read-only documents.

interface IExtension {
    dataType?: "string" | "json";
    description?: string;
    documentWidgetFactoryOptions?: IRenderMime.IDocumentWidgetFactoryOptions | readonly IRenderMime.IDocumentWidgetFactoryOptions[];
    fileTypes?: readonly IRenderMime.IFileType[];
    id: string;
    rank?: number;
    renderTimeout?: number;
    rendererFactory: IRenderMime.IRendererFactory;
}

Properties

dataType?: "string" | "json"

Preferred data type from the model. Defaults to string.

description?: string

Extension description.

Notes

This can be used to provide user documentation on the feature brought by the extension.

The options used to open a document with the renderer factory.

fileTypes?: readonly IRenderMime.IFileType[]

The optional file type associated with the extension.

id: string

The ID of the extension.

Notes

The convention for extension IDs in JupyterLab is the full NPM package name followed by a colon and a unique string token, e.g. '@jupyterlab/apputils-extension:settings' or 'foo-extension:bar'.

rank?: number

The rank passed to RenderMime.addFactory. If not given, defaults to the defaultRank of the factory.

renderTimeout?: number

The timeout after user activity to re-render the data.

rendererFactory: IRenderMime.IRendererFactory

A renderer factory to be registered to render the MIME type.