JSFiddle - React, Tailwind, and code Playground
by aHero1588
HTML
<button type="btn" id="createtable">
Create a HandsonTable
</button>
<button type="btn" id="gettablesetting">
get handsontable using method getSettings()
</button>
<hr>
<div id="example">
</div>
CSS
</style><!-- Ugly Hack due to jsFiddle issue -->
<script src="https://cdn.jsdelivr.net/npm/handsontable@8.0.0/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@8.0.0/dist/handsontable.full.min.css">
JavaScript
var
$$ = function(id) {
return document.getElementById(id);
},
container = $$("example"),
hot;
Handsontable.dom.addEvent(createtable, "click", function() {
hot = new Handsontable(container, {
rowHeaders: true,
colHeaders: true,
dropdownMenu: true,
startRows: 3,
startCols: 3,
contextMenu: true,
licenseKey: 'non-commercial-and-evaluation',
})
})
Handsontable.dom.addEvent(gettablesetting, "click", function() {
console.log(hot.getSettings().startRows)
})