JSFiddle - React, Tailwind, and code Playground

by Roljhon Teano

HTML

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

CSS

#test{
  width:200px;
  height:100px;
  background-color: red;
}

JavaScript

document.getElementById('test').onclick = function(){
			var w = window.open();
      
      var link = document.createElement('link');
			link.rel = "stylesheet";
      link.href ="style.css"; // this will have your table_content_clone CSS
      
      var css = "body{background-color: red;}"; //css of your table_content
      
      var style = document.createElement('style');
      style.type="text/css";
      style.appendChild(document.createTextNode(css));
      w.document.head.appendChild(style);
      w.document.body.innerHTML = "<h1>test</h1>"; // your html table markup
}