Files
DiceCloud/app/imports/ui/components/MarkdownText.vue
2019-04-05 13:05:45 +02:00

21 lines
326 B
Vue

<template lang="html">
<div v-html="compiledMarkdown">
</div>
</template>
<script>
import marked from 'marked';
export default {
props: {
markdown: String,
},
computed: {
compiledMarkdown() {
if (!this.markdown) return;
return marked(this.markdown, { sanitize: true });
},
},
}
</script>