mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 08:56:41 +07:00
allow insert HTML
This commit is contained in:
parent
115583b169
commit
e81e766ea6
4 changed files with 276 additions and 4 deletions
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue