0

In a React application I use react-markdown library to convert markdown string (received from API) to html. The following functionality also needs to be implemented:

Let users highlight part of the text and mark them as correct or incorrect

The current solution stores the raw HTML string into the database and then dangerouslySetInnerHtml to render the HTML.

I'm pretty sure there should be a better approach for this problem. Ideally, I'd like a solution that lets me modify the original markdown string by adding ==highlight== syntax, and a way to store the user input data.

k-lusine
  • 397
  • 4
  • 11

0 Answers0