JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test"></div>

JavaScript

var content = "<img src='http://www.google.de/logos/2012/gymnastics-2012-hp.jpg' onload='console.log(123);' />"

$(document).ready(function() {
    $("#test").replaceWith(content); 
});