Skip to content

SyntaxHighlightingComponentRegisterCodeBlockLanguageParams

Parameters for SyntaxHighlightingComponent.registerCodeBlockLanguage.

Import:

import type { SyntaxHighlightingComponentRegisterCodeBlockLanguageParams } from 'obsidian-dev-utils/obsidian/components/syntax-highlighting-component';

Signature:

export interface SyntaxHighlightingComponentRegisterCodeBlockLanguageParams

Properties

PropertyTypeDescription
editorModestringThe CodeMirror 5 mode name or MIME type the editor highlights the fence as, e.g. text/typescript.
languagestringThe fence language, e.g. the foo in a `foo code block.
prismGrammar?SyntaxHighlightingComponentGrammarSource | undefinedThe grammar highlighting the fence in reading view. Omit when the fence is replaced in reading view — e.g. a fence rendered as a button.