JSFiddle - React, Tailwind, and code Playground

by WernerSalomon

HTML

<script src="https://cindyjs.org/dist/v0.8.7/Cindy.js"></script>
<div id="CSCanvas"></div>

<script>
  CindyJS({ 
	scripts: "cs*", 
	defaultAppearance: { fontFamily: "sans-serif", lineSize: 1, pointSize: 5.0, textsize: 12.0 }, 
	angleUnit: "°", 
	geometry: [ 
		{ name: "F", type: "Free", pos: [ 4.0, -2.0, 1.0 ], color: [ 1.0, 0.0, 0.0 ], labeled: true }, 
		{ name: "A", type: "Free", pos: [ -3.7757009345794392, -4.0, 0.9345794392523364 ], color: [ 1.0, 0.0, 0.0 ], labeled: true }, 
		{ name: "a", type: "Through", pos: [ -0.06072874493927124, 0.9919028340080971, 4.0 ], color: [ 0.0, 0.0, 1.0 ], args: [ "A" ], dashtype: "dashed" }, 
		{ name: "C0", type: "ConicParabolaPL", color: [ 0.0, 0.0, 1.0 ], args: [ "F", "a" ], size: 2, printname: "$C_{0}$" }, 
		{ name: "G", type: "Free", pos: [ 4.0, 3.7391304347826084, 1.0869565217391304 ], color: [ 1.0, 0.0, 0.0 ], labeled: true }, 
		{ name: "b", type: "Through", pos: [ -0.4398110441439974, -0.6922951620785144, 4.0 ], color: [ 0.7568628, 0.0, 0.0 ], args: [ "G" ] }, 
		{ name: "c", type: "Parallel", color: [ 0.4666667, 0.0, 0.7176471 ], args: [ "b", "F" ] }, 
		{ name: "Q", type: "Meet", color: [ 1.0, 0.0, 0.0 ], args: [ "a", "c" ], labeled: true }, 
		{ name: "M", type: "Mid", color: [ 1.0, 0.0, 0.0 ], args: [ "Q", "F" ], labeled: true, size: 2.0, printname: "$M_{FQ}$" }, 
		{ name: "d", type: "Orthogonal", color: [ 0.098039225, 0.61960787, 0.30588236 ], args: [ "c", "M" ], size: 2 }, 
		{ name: "e", type: "Orthogonal", color: [ 0.5019608, 0.5019608, 0.5019608 ], args: [ "a", "Q" ] }, 
		{ name: "B", type: "Meet", color: [ 0.098039225, 0.61960787, 0.30588236 ], args: [ "d", "e" ], labeled: true } ], 
	ports: [ 
		{ id: "CSCanvas", width: 479, height: 360, transform: [ { visibleRect: [ -7.22, 8.74, 11.94, -5.66 ] } ], background: "rgb(168,176,192)" } ], 
	cinderella: { build: 1835, version: [ 2, 9, 1835 ] } });
</script>

<script id="csdraw" type="text/x-cindyscript">
  // code for drawing here
  // poly1 = [ O, X, X', E...