Skip to content

renderCodeBlock

renderCodeBlock<T>(options): string

Defined in: ssr/code-block.ts:66

Renders a static code block as HTML. Styles from prism-code-editor/code-block.css are required in addition to the normal layout.

T extends object

CodeBlockOptions & Omit<T, keyof CodeBlockOptions>

Options controlling how to render the code block. Any extra properties not in CodeBlockOptions will be stringified as JSON and later parsed by forEachCodeBlock.

string

String of HTML for the static code block.