Sample code
Taken from examples/svgExport and making use of
jQuery
<script type="text/javascript" src="libGUIDOEngine.js"></script>
<script>
var guidoEngine;
function processGMN() {
var p = guidoEngine.openParser();
var ar = guidoEngine.string2AR(p, $("#gmnSandbox").val());
guidoEngine.closeParser(p);
var gr = guidoEngine.ar2gr(ar);
var result = guidoEngine.gr2SVG(gr, 1, true, 0);
guidoEngine.freeGR(gr);
guidoEngine.freeAR(ar);
$("#canvasContainer").html(result);
}
$( document ).ready(function() {
guidoEngine = new Module.GuidoEngineAdapter;
guidoEngine.init();
$("#gmnSandbox").on('keyup', processGMN);
});
$(window).unload(function(){
guidoEngine.shutdown();
delete guidoEngine;
});
</script>