Handsontable example
by handsoncode
HTML
<div id="example1" class="hot1 hot handsontable"></div>
<script src="https://cdn.jsdelivr.net/npm/handsontable@8.4.0/dist/handsontable.full.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@8.4.0/dist/handsontable.full.css">
JavaScript
const container = document.getElementById('example1');
const hot = new Handsontable(container, {
data: [
[3, 5, 6],
[6, 7, 9]
],
licenseKey: 'non-commercial-and-evaluation',
colHeaders: true,
rowHeaders: true,
renderer: function(instance, td, row, col, prop, value, cellProperties) {
Handsontable.renderers.TextRenderer.apply(this, arguments);
if (row === 0) {
td.innerHTML = `Changed ${value}`
} else {
td.innerHTML = value
}
}
});
console.log(hot.getCell(0, 0).innerText)