Structure editor widget

Entered SMILES:
Code example how to put widget on the page and catch all structure changes
        var structEditor = $("#structureEditor").structureeditor({
            jsdraw: true,
            jchempaint: true,
            width: 200,
            height: 200,
            smiles: 'CC(=O)Oc1ccccc1C(=O)O',
            onChange: function (event, smiles) {
                $('#smiles').text(smiles);
            }
        }).data('structureeditor');