Interface IRenderMimeRegistry

interface IRenderMimeRegistry {
    latexTypesetter: null | IRenderMime.ILatexTypesetter;
    linkHandler: null | IRenderMime.ILinkHandler;
    markdownParser: null | IRenderMime.IMarkdownParser;
    mimeTypes: readonly string[];
    resolver: null | IRenderMime.IResolver;
    sanitizer: IRenderMime.ISanitizer;
    addFactory(factory, rank?): void;
    clone(options?): IRenderMimeRegistry;
    createModel(options?): MimeModel;
    createRenderer(mimeType): IRenderMime.IRenderer;
    getFactory(mimeType): undefined | IRenderMime.IRendererFactory;
    getRank(mimeType): undefined | number;
    preferredMimeType(bundle, safe?): undefined | string;
    removeMimeType(mimeType): void;
    setRank(mimeType, rank): void;

Implemented by


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.

mimeTypes: readonly string[]

The ordered list of mimeTypes.

resolver: null | IRenderMime.IResolver

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

The sanitizer used by the rendermime instance.


  • Add a renderer factory to the rendermime.


    • factory: IRenderMime.IRendererFactory

      The renderer factory of interest.

    • Optional rank: number

      The rank of the renderer. A lower rank indicates a higher priority for rendering. If not given, the rank will defer to the defaultRank of the factory. If no defaultRank is given, it will default to 100.


      The renderer will replace an existing renderer for the given mimeType.

    Returns void

  • Get the rank for a given mime type.


    • mimeType: string

      The mime type of interest.

    Returns undefined | number

    The rank of the mime type or undefined.

  • Find the preferred mime type for a mime bundle.


    • bundle: ReadonlyPartialJSONObject

      The bundle of mime data.

    • Optional safe: "any" | "ensure" | "prefer"

      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.


    • 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