crossnote
    Preparing search index...

    Class MarkdownEngine

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

    Index

    Constructors

    Properties

    isPreviewInPresentationMode: boolean = false

    Check whether the preview is in presentation mode.

    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;
        "vscode.css": string;
        "vue.css": string;
    } = ...

    Map preview theme to prism theme.

    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;
        "vscode.css": string;
        "white.css": string;
    } = ...

    Methods

    • Chrome (puppeteer) file export

      Parameters

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

      Returns Promise<string>

    • Parameters

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

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

        • OptionalrunAllCodeChunks?: boolean

      Returns Promise<string>

      dest if success, error if failure

    • Generate a minimal HTML template for the graph view webview. Unlike generateHTMLTemplateForPreview, this does not parse any markdown — it just creates a shell that loads graph-view.js.

      Parameters

      • __namedParameters: {
            contentSecurityPolicy?: string;
            vscodePreviewPanel: WebviewPanel | null | undefined;
        }

      Returns string

    • Generate html template for preview.

      Parameters

      • __namedParameters: {
            body?: string;
            config: WebviewConfig;
            contentSecurityPolicy?: string;
            head?: string;
            inputString?: string;
            isVSCodeWebExtension?: boolean;
            parsedOutput?: MarkdownEngineOutput;
            scripts?: string;
            styles?: string;
            vscodePreviewPanel: WebviewPanel | null | undefined;
            webviewScript?: string;
        }
        • Optionalbody?: string
        • config: WebviewConfig
        • OptionalcontentSecurityPolicy?: string
        • Optionalhead?: string
        • OptionalinputString?: string
        • OptionalisVSCodeWebExtension?: boolean
        • OptionalparsedOutput?: MarkdownEngineOutput

          Reuse an existing parseMD result (rendered with the same preview options this template would use) instead of parsing inputString again. Callers that need the parsed output anyway — e.g. the wiki builder, which also ships it as the updateHtml payload — avoid the double render this way.

        • Optionalscripts?: string
        • Optionalstyles?: string
        • vscodePreviewPanel: WebviewPanel | null | undefined
        • OptionalwebviewScript?: string

      Returns Promise<string>

    • Parameters

      • filePath: { offline?: boolean; runAllCodeChunks?: boolean } = {}

      Returns Promise<string>

      dest if success, error if failure

    • Render this note as a complete, self-contained HTML document — the exact document htmlExport writes, without touching the filesystem. Local images/SVGs can be embedded as data URIs so the document works away from the authoring machine; dependency assets (KaTeX CSS, mermaid, …) follow offline: CDN links when false, inlined files when true.

      Front-matter html: keys (offline, embed_local_images, embed_svg) override the arguments, like in htmlExport.

      Parameters

      • __namedParameters: {
            embedLocalImages?: boolean;
            embedSVG?: boolean;
            offline?: boolean;
            runAllCodeChunks?: boolean;
        } = {}

      Returns Promise<string>

    • markdown(gfm) export

      Parameters

      • __namedParameters: { runAllCodeChunks?: boolean } = {}

      Returns Promise<string>

    • generate HTML file and open it in browser

      Parameters

      • __namedParameters: { runAllCodeChunks?: boolean } = {}

      Returns Promise<void>

    • pandoc export

      Parameters

      • __namedParameters: { openFileAfterGeneration?: boolean; runAllCodeChunks?: boolean } = {}

      Returns Promise<string>

    • prince pdf file export

      Parameters

      • __namedParameters: { openFileAfterGeneration?: boolean; runAllCodeChunks?: boolean } = {}

      Returns Promise<string>

      dest if success, error if failure

    • legacy method to support backwards compatibility

      Parameters

      • id: string

      Returns Promise<string>