The options used to initialize a document widget factory.

This interface is intended to be used by mime renderer extensions to define a document opener that uses its renderer factory.

interface IDocumentWidgetFactoryOptions {
    defaultFor?: readonly string[];
    defaultRendered?: readonly string[];
    fileTypes: readonly string[];
    label?: string;
    modelName?: string;
    name: string;
    primaryFileType: string;
    toolbarFactory?: ((widget?) => IRenderMime.IToolbarItem[]);
    translator?: IRenderMime.ITranslator;
}

Properties

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.

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.

primaryFileType: string

The primary file type of the widget.

toolbarFactory?: ((widget?) => IRenderMime.IToolbarItem[])

A function returning a list of toolbar items to add to the toolbar.

Type declaration

The application language translator.