blob: b1d7905fd4f9037e2bf4af25fc1abe2cb383e5bc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import React from 'react';
import marked from 'marked';
import styled from 'styled-components'
const Content = styled.div`
max-width: 100%;
overflow-wrap: anywhere;
img {
max-width: 100%;
}
`
const Markdown = (props) => {
const dangerousHtml = {
__html: marked(props.content)
}
return <Content dangerouslySetInnerHTML={dangerousHtml} />;
}
export default Markdown
|