Markdown now works in property descriptions for viewers
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
computed: {
|
computed: {
|
||||||
compiledMarkdown() {
|
compiledMarkdown() {
|
||||||
if (!this.markdown) return;
|
if (!this.markdown) return;
|
||||||
|
//TODO sanitizing by marked is deprecated
|
||||||
|
//TODO Markdown <hr> need to be styled to match their vue components
|
||||||
return marked(this.markdown, { sanitize: true });
|
return marked(this.markdown, { sanitize: true });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<template lang="html">
|
<template lang="html">
|
||||||
<p v-if="value" class="mt-3">
|
<p v-if="value" class="mt-3">
|
||||||
{{value}}
|
<markdown-text :markdown="value"/>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MarkdownText from '/imports/ui/components/MarkdownText.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: String,
|
value: String,
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
MarkdownText,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user