The options used to initialize a MimeDocumentFactory.

interface IOptions<T> {
    autoStartDefault?: boolean;
    canStartKernel?: boolean;
    dataType?: "string" | "json";
    defaultFor?: readonly string[];
    defaultRendered?: readonly string[];
    factory?: IRenderMime.IRendererFactory;
    fileTypes: readonly string[];
    label?: string;
    modelName?: string;
    name: string;
    preferKernel?: boolean;
    primaryFileType: undefined | DocumentRegistry.IFileType;
    readOnly?: boolean;
    renderTimeout?: number;
    rendermime: IRenderMimeRegistry;
    shutdownOnClose?: boolean;
    toolbarFactory?: ((widget) => DocumentRegistry.IToolbarItem[] | IObservableList<DocumentRegistry.IToolbarItem>);
    translator?: IRenderMime.ITranslator;
}

Type Parameters

Hierarchy (view full)

Properties

autoStartDefault?: boolean

Whether to automatically start the preferred kernel

canStartKernel?: boolean

Whether the widgets can start a kernel when opened.

dataType?: "string" | "json"

Preferred data type from the model.

defaultFor?: readonly string[]

The file types for which the factory should be the default.

defaultRendered?: readonly string[]

The file types for which the factory should be the default for rendering, if that is different than the default factory (which may be for editing) If undefined, then it will fall back on the default file type.

Optional renderer to use (overriding the renderer in the registry)

fileTypes: readonly string[]

The file types the widget can view.

label?: string

The label of the widget to display in dialogs. If not given, name is used instead.

modelName?: string

The name of the document model type.

name: string

The name of the widget to display in dialogs.

preferKernel?: boolean

Whether the widgets prefer having a kernel started.

primaryFileType: undefined | DocumentRegistry.IFileType

The primary file type associated with the document.

readOnly?: boolean

Whether the widget factory is read only.

renderTimeout?: number

The render timeout.

The rendermime instance.

shutdownOnClose?: boolean

Whether the kernel should be shutdown when the widget is closed.

A function producing toolbar widgets, overriding the default toolbar widgets.

The application language translator.