JSFiddle - React, Tailwind, and code Playground

by Rapha Souza

HTML

<script src="//code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<html><head><script>
window.onload=function() {
  window.frames["printf"].focus();
  window.frames["printf"].print();
}
</script>

</head><body cz-shortcut-listen="true">Here is an iframe
<hr>

Click to rewrite and print by loading stuff into it: <input type="button" onclick="var newWin = window.frames['printf'];
newWin.document.write('<body onload=window.print()>




This is a new page I inserted










</body>');
newWin.document.close();" value="Test print">

<iframe id="printf" name="printf" >
<input type="text">

fdfsdfsd

</iframe>
<!--
var newWin = window.frames["printf"];
newWin.document.write('<body onload="window.print()">dddd</body>');
newWin.document.close()-->

<div class="igtranslator-main-div" style="display: none; width: 0px; height: 0px;"><iframe src="about:blank" class="igtranslator-iframe" scrolling="no" frameborder="0"></iframe></div><div class="igtranslator-activator-icon bounceIn" style="display: none;" title="Click to Show Translation"></div></body><style type="text/css" id="igtranslator-color"></style></html>

CSS

.row {
  background: #f8f9fa;
  margin-top: 20px;
}

.col {
  border: solid 1px #6c757d;
  padding: 10px;
}