JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://handsontable.com/dist/handsontable.full.js"></script>
<link rel="stylesheet" href="http://handsontable.com/dist/handsontable.full.css">
<p><a href="http://handsontable.com/" target="_blank">Handsontable</a>で日本語入力関連キーを無視するデモ</p>
<div id="example" class="handsontable"></div>
JavaScript
$(document).ready(function () {
var
data = [
['言語', '発表年', '開発者'],
['FORTRAN', 1957, 'ジョン・バッカス'],
['LISP', 1960, 'ジョン・マッカーシー'],
['Pascal', 1969, 'ニクラウス・ヴィルト'],
['C', 1972, 'デニス・リッチー他']
],
container = document.getElementById('example'),
hot;
hot = new Handsontable(container, {
//data: data,
startCols: 5,
minSpareRows: 1,
fillHandle: false,
selectionMode: 'single',
});
hot.updateSettings({
beforeKeyDown: function (e) {
if ([28,29,241,242,243,244].indexOf(e.keyCode) >= 0) {
e.isImmediatePropagationEnabled = false;
e.isImmediatePropagationStopped = function () {
return true;
}
}
}
});
});