|
@@ -1,15 +1,20 @@
|
|
|
|
|
+import { Typography } from "antd";
|
|
|
import { marked } from "marked";
|
|
import { marked } from "marked";
|
|
|
|
|
|
|
|
|
|
+const { Text } = Typography;
|
|
|
|
|
+
|
|
|
interface IWidget {
|
|
interface IWidget {
|
|
|
text?: string;
|
|
text?: string;
|
|
|
}
|
|
}
|
|
|
const MarkedWidget = ({ text }: IWidget) => {
|
|
const MarkedWidget = ({ text }: IWidget) => {
|
|
|
return (
|
|
return (
|
|
|
- <div
|
|
|
|
|
- dangerouslySetInnerHTML={{
|
|
|
|
|
- __html: marked.parse(text ? text : ""),
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <Text>
|
|
|
|
|
+ <div
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: marked.parse(text ? text : ""),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </Text>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|