MarkdownPreviewRenderer.createCodeBlockPostProcessor method
MarkdownPreviewRenderer › createCodeBlockPostProcessor
Official
Create a code block post processor.Signature:
createCodeBlockPostProcessor(language: string, handler: (source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) => void | Promise<any>): (el: HTMLElement, ctx: MarkdownPostProcessorContext) => voidParameters:
| Parameter | Type | Description |
|---|---|---|
| language | string | The language of the code block. |
| handler | (source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) => void | Promise<any> | Renders the code block, given its source, the element to render into, and the context. |
Returns: (el: HTMLElement, ctx: MarkdownPostProcessorContext) => void
Since: 0.12.11