Reputation: 122052
I'm working through the reactjs tutorial but am trying to avoid jsx and use the virtual DOM manually. How do I do the equivalent of
<span dangerouslySetInnerHTML={{__html: rawMarkup}} />
Upvotes: 11
Views: 1266
Reputation: 122052
Found the answer plugging around the source code:
React.DOM.div({ dangerouslySetInnerHTML: {
__html: markdown.makeHtml(this.props.children.toString())
} });
or in coffeescript:
R.div dangerouslySetInnerHTML: __html: markdown.makeHtml @props.children.toString()
Upvotes: 17