markdown display of email body

This commit is contained in:
Jeffrey Biles
2020-03-18 16:10:01 -07:00
parent 0a3982c2a4
commit e297a104e4
3 changed files with 20 additions and 4 deletions

View File

@@ -1,13 +1,20 @@
<template>
<div>
From: {{email.from}}<br>
Subject: <strong>{{email.subject}}</strong>
<p>{{email.body}}</p>
<div class="email">
<div>From: {{email.from}}</div>
<div>Subject: <strong>{{email.subject}}</strong></div>
<div v-html="emailMarkdown" />
</div>
</template>
<script>
import marked from 'marked';
export default {
setup({email}) {
let emailMarkdown = marked(email.body);
return {
emailMarkdown
}
},
props: {
email: {
type: Object
@@ -17,4 +24,7 @@
</script>
<style scoped>
.email {
text-align: left;
}
</style>