This commit is contained in:
37
ayanova/src/components/wiki-control.vue
Normal file
37
ayanova/src/components/wiki-control.vue
Normal 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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user