Newer
Older
tests / index.html
<!DOCTYPE html>
<html>
<head>
<link href="https://unpkg.com/tabulator-tables/dist/css/tabulator.min.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript" src="https://unpkg.com/tabulator-tables/dist/js/tabulator.min.js"></script>
<div id="example-table"></div>

<script type="text/javascript">

var tabledata2 = [
		{id:1, name: "Test1", image: "https://upload.wikimedia.org/wikipedia/commons/7/79/Operation_Upshot-Knothole_-_Badger_001.jpg"},
		{id:2, name: "Test2", image: "https://upload.wikimedia.org/wikipedia/commons/e/e6/Rosa_rubiginosa_1.jpg"},
		{id:3, name: "Test3", image: "https://upload.wikimedia.org/wikipedia/commons/e/e6/Rosa_rubiginosa_1.jpg"},
	];

var table = new Tabulator("#example-table", {
    data:tabledata2,
    columns:[
		    {title: "Name", field: "name"},
		    {title: "Image", field: "image", formatter: "image", formatterParams: {height: "50px", width: "50px"}},
    ],
});

// TODO: define index
</script>
</body>
</html>