Class CodeMirrorMimeTypeService

The mime type service for CodeMirror.

Implements

Constructors

Properties

Methods

  • Returns a mime type for the given file path.

    Notes

    If a mime type cannot be found returns the default mime type text/plain, never null. There may be more than one mime type, but only the first one will be returned. To access all mime types, use IEditorLanguageRegistry instead.

    Parameters

    • path: string

    Returns string