Class MarkdownEngine

The markdown engine that can be used to parse markdown and export files

Constructors

Properties

codeChunksData: {
    [key: string]: CodeChunkData;
} = {}

Type declaration

fileDirectoryPath: string
filePath: string

markdown file absolute path

filesCache: {
    [key: string]: string;
} = {}

Type declaration

  • [key: string]: string
graphsCache: {
    [key: string]: string;
} = {}

Type declaration

  • [key: string]: string
headings: HeadingData[]
isPreviewInPresentationMode: boolean = false

Check whether the preview is in presentation mode.

notebook: Notebook
projectDirectoryPath: URI
tocHTML: string
vscodePreviewPanel: undefined | null | WebviewPanel

Dirty variable just made for VSCode preview.

AutoPrismThemeMap: {
    atom-dark.css: string;
    atom-light.css: string;
    atom-material.css: string;
    github-dark.css: string;
    github-light.css: string;
    gothic.css: string;
    medium.css: string;
    monokai.css: string;
    newsprint.css: string;
    night.css: string;
    one-dark.css: string;
    one-light.css: string;
    solarized-dark.css: string;
    solarized-light.css: string;
    vue.css: string;
} = ...

Map preview theme to prism theme.

Type declaration

  • atom-dark.css: string
  • atom-light.css: string
  • atom-material.css: string
  • github-dark.css: string
  • github-light.css: string
  • gothic.css: string
  • medium.css: string
  • monokai.css: string
  • newsprint.css: string
  • night.css: string
  • one-dark.css: string
  • one-light.css: string
  • solarized-dark.css: string
  • solarized-light.css: string
  • vue.css: string
AutoPrismThemeMapForPresentation: {
    beige.css: string;
    black.css: string;
    blood.css: string;
    league.css: string;
    moon.css: string;
    night.css: string;
    serif.css: string;
    simple.css: string;
    sky.css: string;
    solarized.css: string;
    white.css: string;
} = ...

Type declaration

  • beige.css: string
  • black.css: string
  • blood.css: string
  • league.css: string
  • moon.css: string
  • night.css: string
  • serif.css: string
  • simple.css: string
  • sky.css: string
  • solarized.css: string
  • white.css: string

Accessors

Methods

  • Chrome (puppeteer) file export

    Parameters

    • __namedParameters: {
          fileType: undefined | string;
          openFileAfterGeneration: undefined | boolean;
          runAllCodeChunks: undefined | boolean;
      }
      • fileType: undefined | string
      • openFileAfterGeneration: undefined | boolean
      • runAllCodeChunks: undefined | boolean

    Returns Promise<string>

  • Parameters

    • __namedParameters: {
          fileType: string;
          runAllCodeChunks?: boolean;
      }
      • fileType: string

        fileType: 'epub', 'pdf', 'mobi' or 'html'

      • Optional runAllCodeChunks?: boolean

    Returns Promise<string>

    dest if success, error if failure

  • Generate html template for preview.

    Parameters

    • __namedParameters: {
          body?: string;
          config: WebviewConfig;
          contentSecurityPolicy?: string;
          head?: string;
          inputString?: string;
          isVSCodeWebExtension?: boolean;
          scripts?: string;
          styles?: string;
          vscodePreviewPanel: undefined | null | WebviewPanel;
          webviewScript?: string;
      }
      • Optional body?: string
      • config: WebviewConfig
      • Optional contentSecurityPolicy?: string
      • Optional head?: string
      • Optional inputString?: string
      • Optional isVSCodeWebExtension?: boolean
      • Optional scripts?: string
      • Optional styles?: string
      • vscodePreviewPanel: undefined | null | WebviewPanel
      • Optional webviewScript?: string

    Returns Promise<string>

  • Generate