How to enable 'hard edit' mode?
How to enable 'hard edit' mode?

How can I enable the 'hard edit' modus (orange ring) instead of the 'soft edit' modus (blue ring)?
I want keyCode 113 (F2) to enable the hard edit modus (just like Excel).
But when i use edit()
, it enables the soft edit modus.
How can I get access to the hard edit modus?
Edit: I'm using keyTable with Editor, like this example
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Double click on the cell. Or click to focus and then press return.
Allan
I understand, but that's not what I want.
I want to edit the cell by pressing F2 (keyCode 113) to enable the hard edit modus.
Is there an function to achieve that? Something like
if(keyCode === 113) { table.cell(this).edit('hardEdit') }
Currently no - there is no API for that. It would require a modification to the KeyTable library here. This is how it triggers a hard edit internally if you want to implement that.
Its a good idea - thank you for it, and I'll look into it for the next release.
Allan
So for anyone else who wants Excel like navigation/edit:
Note: This disabled Enter/Return for (hard)edit a cell
Could be improved, but this works for me
Committed in here. Thanks
.
Allan
@allan , I'm not sure but I think the
break;
needs to be after theif(){}
statement.But like this:
The idea was that if Editor isn't defined then it will fall through to the default handler allowing the
.
key
event to handle F2 if required. Good point though, I should have commented that. Added nowAllan