JSDraw2.Table - *html* column type

Source Code:
    dojo.addOnLoad(function () {
        var jss = new JSDraw2.Table("",
            { columns: [
                { key: 'smiles', caption: 'Smiles', width: 220 },
                { key: 'structure', caption: 'Structure', type: 'html', 
                    html: "<img src='./service.aspx?cmd=smiles2img&q={1}'>", 
                    formula:"escape($smiles)", width: 300, viewonly: true }
                ]
            }, "Div1");
    });
You can type SMILES in the Smiles column, and it will automatically show its picture in Structure column:
(there are many smiles samples you can copy from this page)



Copyright 2022, Scilligence (http://www.scilligence.com/)

License: