Skip to content

ContentMarkdown ​

Renders Markdown with a small renderer that escapes the text and only produces safe tags, or with a renderer of your own.

ts
import { ContentMarkdown } from '@zairakai/vue-components/Content'

Usage ​

vue
<ContentMarkdown />

Example ​

Markdown

Some bold, italic and code, and a link.

vue
<template>
  <ContentMarkdown
    source="## Markdown&#10;&#10;Some **bold**, *italic* and `code`, and a [link](https://example.com)."
  />
</template>

Props ​

NameTypeDefaultDescription
idstring
classstring
sourcestring''
rendererfuncundefinedYour own renderer: (markdown) => html. It must return HTML that is safe to show: sanitize it (DOMPurify) if the Markdown does not come from you.

See Theming for the class hooks and the data-* state of the components.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.