This commit is contained in:
2020-04-15 23:40:16 +00:00
parent a78dd4ec3a
commit 786ca1af10
2 changed files with 26 additions and 4 deletions

View File

@@ -1,14 +1,34 @@
<template>
<v-col cols="12">
<div class="display-3">wiki viewer control</div>
<div>Content: {{ content }}</div>
</v-col>
<div>
<v-col cols="12">
<span class="v-label v-label--active theme--light">
{{ $ay.t("WikiPage") }}
</span>
<div v-html="compiledOutput"></div>
<div>raw Content: {{ content }}</div>
</v-col>
</div>
</template>
<script>
import marked from "marked";
export default {
data: () => ({}),
props: {
content: String
},
computed: {
compiledOutput() {
return marked(this.content, { sanitize: true });
}
}
};
/**
*
* //markdown viewer
Vue.filter("marked", function vueMarkedFilter(value) {
return marked(value, { sanitize: true });
});
*/
</script>