An object which manages mime renderer factories.

This object is used to render mime models using registered mime renderers, selecting the preferred mime renderer to render the model into a widget.

This class is not intended to be subclassed.

Implements

Constructors

Properties

latexTypesetter: null | IRenderMime.ILatexTypesetter

The LaTeX typesetter for the rendermime.

linkHandler: null | IRenderMime.ILinkHandler

The object used to handle path opening links.

markdownParser: null | IRenderMime.IMarkdownParser

The Markdown parser for the rendermime.

resolver: null | IRenderMime.IResolver

The object used to resolve relative urls for the rendermime instance.

The sanitizer used by the rendermime instance.

translator: ITranslator

The application language translator.

Accessors

Methods

  • Find the preferred mime type for a mime bundle.

    Parameters

    • bundle: ReadonlyPartialJSONObject

      The bundle of mime data.

    • safe: "any" | "ensure" | "prefer" = 'ensure'

      How to consider safe/unsafe factories. If 'ensure', it will only consider safe factories. If 'any', any factory will be considered. If 'prefer', unsafe factories will be considered, but only after the safe options have been exhausted.

    Returns undefined | string

    The preferred mime type from the available factories, or undefined if the mime type cannot be rendered.

  • Set the rank of a given mime type.

    Parameters

    • mimeType: string

      The mime type of interest.

    • rank: number

      The new rank to assign.

      This is a no-op if the mime type is not registered.

    Returns void