There are a bunch of answers on this, but I'm looking for something specific to reactjs
My component code:
render: function () {
return (
<Modal {...this.props} title="Embed on your own site!">
<div className="modal-body">
<div className="tm-embed-container" dangerouslySetInnerHTML={{__html: embedCode}}>
</div>
<textarea className="tm-embed-code" rows="4" wrap="on" defaultValue={embedCode}></textarea>
</div>
</Modal>
);
}
});
The script tag is there on the page, but no execution. Should I go outside of react and just use good ol' DOM scripting as the other answers indicate?