Skip to content

LatexMarkdownEditorOptions

Defined in: latex/lib/main.ts:59

optional enableMathJaxA11y?: boolean

Defined in: latex/lib/main.ts:107

When mathJaxLoadMode is url-import: whether MathJax may start its SRE speech worker and enrichment. Default true.

Set to false in hosts where web workers cannot importScripts extension or webview resource URLs (VS Code webviews). Otherwise MathJax loads sre/speech-worker.js via a blob worker + importScripts, the worker fails, and tex2svgPromise / tex2chtmlPromise never settle.

When mathJaxLoadMode is static-import, this option is ignored — set window.MathJax.options yourself before the static import (see preconfigureMathJaxLoader).

true

optional mathJaxLoadMode?: MathJaxLoadMode

Defined in: latex/lib/main.ts:76

How MathJax is initialized. Defaults to url-import.


optional mathJaxPackageUrl?: string

Defined in: latex/lib/main.ts:91

When mathJaxLoadMode is url-import (default): base URL for MathJax’s package root (the folder that contains tex-svg.js / tex-chtml.js), used for loader.paths.mathjax and for loading the startup bundle. Must be an absolute URL the browser can load (e.g. https://… or a same-origin path such as https://my.app/assets/mathjax or a VS Code webview vscode-resource: URL). No trailing slash is required.

Omit to use the default jsDelivr URL for the version constant in this package (you are not required to match that version if you pass your own URL).

When mathJaxLoadMode is static-import, this option is ignored (configure window.MathJax yourself; see preconfigureMathJaxLoader).


optional output?: LatexMathOutput

Defined in: latex/lib/main.ts:66

How formulas are rendered. svg uses MathJax SVG (tex-svg.js, fonts embedded in the combined component). html uses CHTML (tex-chtml.js) when SVG is problematic. Prefer these over the -nofont variants so the browser does not need a separate font CDN fetch.


optional renderCacheSize?: number

Defined in: latex/lib/main.ts:72

Max entries for the in-memory render cache (cloned DOM per hit). Helps when the same formula is re-folded while moving the caret. Set to 0 to disable.

128