This commit is contained in:
2020-04-15 23:58:08 +00:00
parent 786ca1af10
commit 4f5fca0dd7
4 changed files with 41 additions and 39 deletions

View File

@@ -0,0 +1,37 @@
<template>
<div>
<v-col cols="12">
<span class="v-label v-label--active theme--light">
{{ $ay.t("WikiPage") }}
</span>
<v-sheet elevation="4" color="light-gray" v-html="compiledOutput" class="pa-2 pa-sm-6">
<!-- <div v-html="compiledOutput"></div> -->
</v-sheet>
<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 });
return marked(this.content);
}
}
};
/**
todo:
put the output on a paper element so it's raised and delineated
figure out why parts are fucked (blockquote)
remove extra spacing on sides in xs mode (gutters maybe on column or row?)
Show/hide/edit control
*/
</script>

View File

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