I saved some editor output to the database. The output containing the html code is converted to a string like this:
"<p><span style='color: rgb(43, 51, 94); font-size: 14px; font-style: normal; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;'>Some Content...</span> v</p>"
I got the value from the database as an object and used it in React:
<div className="content-main">
{data.content}
</div>
Result:
I did a lot of searching, but I didn't find any solution or my search was wrong. What is the correct way to convert this value to HTML in React?
Thank you for helping me.