handsontable-chosen-editor
handsontable-chosen-editor copied to clipboard
how can i use copy AND paste function?
when i use this editor, the copy and paste will not work? how can i deal with this condition ? Please
when i use handsontable7.0.3.full.js , copyPaste function will not work , but when i use the version handsontable0.19.0 that you use in you example, it can work ; how should i do with handsontable7.0.3?
Sorry, I am currently not actively working on this. I am looking to merge this https://github.com/mydea/handsontable-chosen-editor/pull/16, which might fix your issue (but not sure).
I got stuck on this issue too. Are there any clues to solve this problem? @mydea @stw13813013798
This is for Handsontable 5.0.0
let cp_row, cp_column, cp_row2, cp_data, cp_validate;
function cp_handler(e) {
var evtobj = window.event? event : e
if (evtobj.keyCode == 67 && evtobj.ctrlKey){
cp_data = new Array();
for(let i = cp_row; i <= cp_row2;i++){
cp_data.push(table.getDataAtCell(i, cp_column));
}
cp_validate = cp_column;
}
if (evtobj.keyCode == 86 && evtobj.ctrlKey){
if(cp_validate != cp_column){
//alert('Do tohoto sloupce nelze vložit tyto data.');
} else {
let setData = new Array();
for(let i = cp_row; i <= cp_row + cp_data.length - 1;i++){
setData.push([i, cp_column, cp_data[i-cp_row]]);
}
table.setDataAtCell(setData);
}
}
}
document.addEventListener('keydown', cp_handler);
then in new Handsontable( etc. copyPaste: false afterSelection: (row, column, row2, column2, preventScrolling, selectionLayerLevel) => { cp_row = row; cp_column = column; cp_row2 = row2; }
how can i use copy AND paste function?Please