@@ -34,6 +34,7 @@
"jszip": "^3.10.1",
"lamejs": "^1.2.1",
"language-hk-loader": "^1.0.1",
+ "markdown-it": "^14.1.0",
"pdfjs-dist": "^2.5.207",
"qrcodejs2": "^0.0.2",
"qs": "^6.10.1",
@@ -1,18 +1,30 @@
<template>
<div class="mdView">
-
+ <div v-html="renderedMarkdown"></div>
</div>
-</template>
-<script>
- export default {
+ </template>
+
+ <script>
+ import MarkdownIt from 'markdown-it';
+ export default {
+ data() {
+ return {
+ markdownContent: '# Hello, Markdown!',
+ md: new MarkdownIt()
+ };
+ },
+ computed: {
+ renderedMarkdown() {
+ return this.md.render(this.markdownContent);
+ }
}
-</script>
-<style scoped>
-.mdView{
- width: 100%;
- height: 100%;
-}
-</style>
+ </script>
+ <style scoped>
+ .mdView{
+ width: 100%;
+ height: 100%;
+ </style>