This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user