SiMarkdownHighlightJsOptions Type documentation¶
TypeScript declaration¶
import type { SiMarkdownHighlightJsOptions } from '@siemens/element-ng/markdown/hightlighter/highlightjs';Configuration for the Highlight.js highlighter
Properties¶
-
Should language be auto-detected? This only works with already loaded languages
-
options passed to highlight.js
highlightJs?:
Partial<HighlightOptions>¶ -
Language loader to load languages lazily.
Example:
const hljsLanguageLoader = async (lang: string): HighlightJSLanguageImport => { switch (lang) { case 'c': return import('highlight.js/lib/languages/c'); case 'cmake': return import('highlight.js/lib/languages/cmake'); case 'cpp': return import('highlight.js/lib/languages/cpp'); } return undefined; };
Types Documentation¶
import type { HighlightJSLanguageLoader } from '@siemens/element-ng/markdown/hightlighter/highlightjs';Language loader
import type { HighlightJSLanguageImport } from '@siemens/element-ng/markdown/hightlighter/highlightjs';type of a language import
Except where otherwise noted, content on this site is licensed under MIT License.