I have generated a rich-text using a ckedtor in laravel and fetched it to nextjs for display. I have used:
<div dangerouslySetInnerHTML={{ __html: htmlString }} />
and: ReactHtmlParser(htmlString) but None outputs the texts as it appears in laravel backend, actually its missing the styling (i.e: bold, font-size, bulleting, link-color and numbering. How can display this richtext in nextjs? Kindly help.
The problem is with Tailwindcss, it overrides all the styles and resets them.
There is a plugin you can use to fix that. install it:
update your tailwind.config.js
then give
className="prose"to your rich text editor divfor more information you can visit this link