Appearance
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 Some **bold**, *italic* and `code`, and a [link](https://example.com)."
/>
</template>Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | ||
class | string | ||
source | string | '' | |
renderer | func | undefined | Your 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.