I doing a little project and I want to display some text, which I get as HTTP response, in some textfield. The text I am getting is html, but when I am trying to display it, it's not formatting the text, but showing the plain text with tags. Please see attached screenshot for reference.
I am using react.js on the front-end. Not sure if there are special rules I missed.
I have tried wrapping the response in a div, textarea and article tag. Nothing was successful.
Please help!
This is my component:
const Show = (props) => (
<div className='content'>
<a href={props.job.url}><span className='ListEntryTitle'>{props.job.title}
</span></a>
<p className='ListEntryCompany' style={{margin: "0 0 0 0"}}>
{props.job.company}</p>
<p className='ListEntryType'>{props.job.type}</p>
<article className="box" type="text/html" style={{width: "auto", height:
"350px", overflow: "auto"}}>{props.job.description}</article>
<button className="button" onClick={props.saveJob}>Save</button>
<button className="button" onClick={props.nextJob}>Next</button>
<div>
<button className="button" onClick={props.newSearch}>new Search</button>
</div>
</div>
)