JSFiddle - React, Tailwind, and code Playground

by kidsdial1

HTML

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<style>
    .container {
        background: silver;
        position: relative;
    }

    .container img {
        position: absolute;
        top: 0;
        bottom: 250px;
        left: 0;
        right: 0;
        margin: auto;
        z-index: 999;
    }

    .masked-img {
        overflow: hidden;
        position: relative;
    }

    .pip {
        display: inline-block;
        margin: 0;
        position: absolute;
    }

    .edit {
        display: block;
        background: #444;
        border: 1px solid black;
        color: white;
        text-align: center;
        cursor: pointer;
        position: absolute;
        z-index: 3;
    }

    .edit:hover {
        background: white;
        color: black;
        position: absolute;
        z-index: 3;
    }   

    .dark_content {
        display: none;
        position: relative;
        top: 25%;
        left: 25%;
        width: 250px;
        height: 250px;
        padding: 16px;
        border: 16px solid orange;
        background-color: white;
        z-index: 1002;
        overflow: auto;
    }	
	
</style>

<body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js">
    </script>

    <input id="fileup" name="fileup" type="file" style="display:none">

    <div id="container" class="container">
    </div>

    <template id='demoTemplate'>
        <span>
            <div class="btn-group">
                <button type="button" class="js-zoom-in" onclick="zoom_in(this)">Zoom In</button>
                <button type="button" class="js-zoom-out" onclick="zoom_out(this)">Zoom Out</button>
                <button type="button" class="js-rotate-right" onclick="rotate_right(this)">Rotate Right</button>
                <button type="button" class="js-rotate-left" onclick="rotate_left(this)">Rotate Left</button>
            </div>
            <img id="image" src=""...