love the way you coding but there are several issues in your code firstly you have to use the useffect to rerender the prisma plugin in this you can handle that I guess
asked 4 months ago
2 Answers
24Views
How do i do this correctly??
"use client";
import React, { useEffect } from "react";
import Prism from "prismjs";
import parse from "html-react-parser";
import "prismjs/components/prism-python";
import "prismjs/components/prism-java";
import "prismjs/components/prism-c";
import "prismjs/components/prism-cpp";
import "prismjs/components/prism-csharp";
import "prismjs/components/prism-aspnet";
import "prismjs/components/prism-sass";
import "prismjs/components/prism-jsx";
import "prismjs/components/prism-typescript";
import "prismjs/components/prism-solidity";
import "prismjs/components/prism-json";
import "prismjs/components/prism-dart";
import "prismjs/components/prism-ruby";
import "prismjs/components/prism-rust";
import "prismjs/components/prism-r";
import "prismjs/components/prism-kotlin";
import "prismjs/components/prism-go";
import "prismjs/components/prism-bash";
import "prismjs/components/prism-sql";
import "prismjs/components/prism-mongodb";
import "prismjs/plugins/line-numbers/prism-line-numbers.js";
import "prismjs/plugins/line-numbers/prism-line-numbers.css";
interface Props {
data: string;
}
const ParseHTML = ({ data }: Props) => {
return <div className={"markdown w-full min-w-full"}>{parse(data)}</div>;
};
export default ParseHTML;
love the way you coding but there are several issues in your code firstly you have to use the useffect to rerender the prisma plugin in this you can handle that I guess
This is correct way to do that,
This is correct way to do that
This is correct way to do that
This is correct way to do that
This is correct way to do that