aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/Content.js
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/Content.js')
-rw-r--r--webui/src/Content.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/webui/src/Content.js b/webui/src/Content.js
index 19f57631..3a6900bc 100644
--- a/webui/src/Content.js
+++ b/webui/src/Content.js
@@ -2,12 +2,19 @@ import unified from 'unified';
import parse from 'remark-parse';
import html from 'remark-html';
import remark2react from 'remark-react';
+import ImageTag from './tag/ImageTag';
+import PreTag from './tag/PreTag';
const Content = ({ markdown }) => {
const processor = unified()
.use(parse)
.use(html)
- .use(remark2react);
+ .use(remark2react, {
+ remarkReactComponents: {
+ img: ImageTag,
+ pre: PreTag,
+ },
+ });
return processor.processSync(markdown).contents;
};