diff --git a/web/src/components/MarkdownRenderer.vue b/web/src/components/MarkdownRenderer.vue index f17ce867..2adfd5d1 100644 --- a/web/src/components/MarkdownRenderer.vue +++ b/web/src/components/MarkdownRenderer.vue @@ -9,11 +9,12 @@ import { nextTick } from 'vue' import feather from 'feather-icons' import MarkdownIt from 'markdown-it'; import emoji from 'markdown-it-emoji'; -import 'highlight.js/styles/tomorrow-night-blue.css' +//import 'highlight.js/styles/tomorrow-night-blue.css' //import 'highlight.js/styles/tokyo-night-dark.css' import hljs from 'highlight.js'; + const markdownIt = new MarkdownIt('commonmark', { html: false, xhtmlOut: true, @@ -26,8 +27,8 @@ const markdownIt = new MarkdownIt('commonmark', { try { return ( - '
'+
-      '' +
+          '
' +
+          '' +
           hljs.highlight(str, { language: lang }).value +
           '
' ); @@ -35,7 +36,7 @@ const markdownIt = new MarkdownIt('commonmark', { } catch (__) { } } return ( - '
'+
+      '
' +
       '' +
       markdownIt.utils.escapeHtml(str) +
       '
' @@ -53,22 +54,28 @@ export default { }, data() { return { - renderedMarkdown: '' + renderedMarkdown: '', + }; }, mounted() { - + this.renderedMarkdown = markdownIt.render(this.markdownText); nextTick(() => { feather.replace() }) + }, + created() { + + }, methods: { copyContentToClipboard() { navigator.clipboard.writeText(theCode); }, + }, watch: { markdownText(newText) { @@ -78,7 +85,12 @@ export default { feather.replace() }) - } + }, + + }, + computed:{ + + } };