Added markdown support to features

This commit is contained in:
Stefan Zermatten
2019-04-05 13:05:45 +02:00
parent b35e08b9b4
commit ab2ea36541
9 changed files with 52 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
<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>