Environment
Unofficial
Environment object passed to Prism hooks and used during highlighting.
Import:
import type { Environment } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface EnvironmentProperties
| Property | Type | Description | |
|---|---|---|---|
| attributes? | Record<string, string> | Additional attributes for the wrapping element. | |
| classes? | string[] | CSS classes applied to the token. | |
| code? | string | The source code to highlight. | |
| content? | string | The content of a token. | |
| element? | Element | The target element being highlighted. | |
| grammar? | Grammar | The grammar used for tokenization. | |
| highlightedCode? | string | The highlighted HTML code. | |
| language? | string | The language identifier. | |
| parent? | Array<PrismToken | string> | The parent token array. | |
| selector? | string | CSS selector used to find code elements. | |
| tag? | string | The HTML tag name for the token. | |
| tokenSequence? | Array<PrismToken | string> | The token sequence. | |
| type? | string | The type of the token. |