Handsontable example

by handsoncode

HTML

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css">
<script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
<div id="example1"></div>

CSS

body {
  background: #FFF;
  margin: 0;
  padding: 0;
}
td, th {
  font: 0.8em 'Helvetica';
}

JavaScript

document.addEventListener("DOMContentLoaded", function() {

  var
    example = document.getElementById('example1'),
    hot;
  var myData = [
  	['Handsontable.CustomBorders', 'Handsontable.plugins.CustomBorders'],
    ['Handsontable.MergeCells', 'Handsontable.plugins.MergeCells'],
    ['Handsontable.Search', 'Handsontable.plugins.Search'],
    ['Handsontable.UndoRedo', 'Handsontable.plugins.UndoRedo']
  ];
  
  hot = new Handsontable(example,{
    data: myData,
    editor: false,
    colWidths: 373,
    licenseKey: 'non-commercial-and-evaluation',
    colHeaders: ['Was', 'Is']
  });
  
  

});