MotionScript

@motion-script/code


@motion-script/code / loadCodeLanguage

Function: loadCodeLanguage()

loadCodeLanguage(language, _theme?): Promise<void>

Defined in: components/code/src/highlight.ts:138

Load a syntax-highlight language into the shared highlighter. Exposed so a Code node's asset loader can run it on the timeline, and so apps can preload languages explicitly. Returns once the parser is ready (or immediately for an unsupported language). The theme arg is accepted for backwards compatibility.

Parameters

language

string

_theme?

string

Returns

Promise<void>