The following code includes jQuery, jQueryUI, jsPlumb, Highcharts.js, and Bootstrap.
Include what you need, and feel free to limit the app's width: ...class="statemachine" style="width:600px"
If you want your embedded app to load a custom machine by default,
simply paste the contents of your saved .txt file into
<div class="statemachine">...</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <script src="http://web.mit.edu/6.mitx/www/6.01-statemachine/touchpunch.js"></script> <script type="text/javascript" src="http://web.mit.edu/lu16j/www/state/jsPlumb.js "></script> <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/modules/exporting.js"></script> <script src="http://web.mit.edu/lu16j/www/boots/bootstrap/js/bootstrap.min.js"></script> <link href="http://web.mit.edu/lu16j/www/boots/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <script src="http://web.mit.edu/6.mitx/www/6.01-statemachine/definitions.js"></script> <script src="http://web.mit.edu/6.mitx/www/6.01-statemachine/mvc.js"></script> <link href="http://web.mit.edu/6.mitx/www/6.01-statemachine/mvc.css" rel="stylesheet"> <div class="statemachine"></div>
Demos: