allow insert HTML

This commit is contained in:
Fedor Katurov 2023-04-27 18:32:13 +06:00
parent 115583b169
commit e81e766ea6
4 changed files with 276 additions and 4 deletions

View file

@ -4,6 +4,8 @@ import { useContainerPaddings } from "~/modules/theme/hooks/useContainerPaddings
import styles from "./styles.module.scss";
import { Button } from "~/components/buttons/Button";
import { useTranslation } from "react-i18next";
import remarkGfm from "remark-gfm";
import rehypeRaw from "rehype-raw";
interface ReactMarkdownViewerProps {
value: string;
@ -31,7 +33,9 @@ const ReactMarkdownViewer: FC<ReactMarkdownViewerProps> = ({
</div>
<div className={styles.content}>
<ReactMarkdown>{value}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw]}>
{value}
</ReactMarkdown>
</div>
</div>
);