JSFiddle - React, Tailwind, and code Playground

by dutchman71

HTML

<!doctype html>
<html>
        <head>
                <title>Example</title>
                <meta http-equiv="content-type" content="text/html;charset=utf-8" />    
            <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
                <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
                <script type="text/javascript" src="http://jsplumb.org/js/1.3.1/jquery.jsPlumb-1.3.1-all-min.js"></script>
        </head>
        <body >
                <div class="node" id="block1" style="position: absolute;">Block1</div>
                <div class="node" id="block2" style="position: absolute;">Block2</div>
    </body>
</html>

JavaScript

var endpointOptions = {	
						anchor:"BottomCenter",
						maxConnections:1, 
						isSource:true, 
						isTarget:true, 
						endpoint:["Dot", {radius:5}], 
						paintStyle:{fillStyle:"#5b9ada"},
						connectorStyle : {  lineWidth: 3, strokeStyle:"#5b9ada" },
						connector : new jsPlumb.Connectors.Straight(),
						setDragAllowedWhenFull:true,
						connectorOverlays:[ 
							[ "Arrow", { width:20, length:30, location:1, id:"arrow" } ], 
							[ "Label", { label:"", id:"label" } ]
						]				
						}
                
                jsPlumb.bind("ready", function() {
                        
                        jsPlumb.addEndpoint('block1', endpointOptions);
                        
                        jsPlumb.addEndpoint('block2', endpointOptions);
                        
                        jsPlumb.draggable('block1');
                        jsPlumb.draggable('block2');
                });