Open flatsiedatsie opened 11 months ago
This modification makes the backspace work:
} else if ((e.keyCode == 8) ||
(e.keyCode >= 48 && e.keyCode <= 57) ||
(e.keyCode >= 96 && e.keyCode <= 111) ||
(e.keyCode >= 187 && e.keyCode <= 190) ||
((String.fromCharCode(e.keyCode) == e.key || String.fromCharCode(e.keyCode).toLowerCase() == e.key.toLowerCase()) && jexcel.validLetter(String.fromCharCode(e.keyCode)))) {
if ((e.keyCode == 8) && jexcel.current.options.columns[columnId].type == 'image'){
jexcel.current.updateCell(columnId, rowId, '', true);
}
// Start edition
jexcel.current.openEditor(jexcel.current.records[rowId][columnId], true);
I found it surprisingly difficult to remove an image from a cell.
For example, in the demo you can see that pressing backspace shows the image in a popup instead of removing it.
I resorted to hacking a "Clear cell" option into the context menu, but it would be better if backspace removed the image.