Copy, Cut and Paste in Custom Context Menu

Hi,

I am trying to put the copy, paste, and cut functionality into the handsontable context menu, but for some reason it seems that only the paste functionality works. I might be using the copyPaste plugin wrong to do this. When I try to copy with the context menu, I get a javascript error saying setCopyable is not a function. For cut, I am using the triggerCut function and I do not get an error, but it does not seem to work. I’m using triggerPaste for the paste function and it’s working great! I do not know if I am doing something wrong or not when creating the context menu.

Here is a jsfiddle demonstrating my problem: http://jsfiddle.net/mountaineerfan5/6avL40fn/1/

Any info or help would be greatly appreciated!

Thanks!

Hi @melissa

I think that the issue may be related to one of this issues reported at our Github board. Can you check it please?

Yeah it’s similar to the most recent post by jakever. I tried to do it without any callback for copy, paste and cut, but got the same result, where it says null. That’s why I tried to use the copyPaste plugin functions in the callback, but I’m guessing it’s just a bug then. The ctrl + z,p, and z still work, so it’s not bad. I just wanted to allow the user to copy, cut or paste with the context menu.
Thanks for the info and help!

You’re welcome.

I will let you know as soon as this issue will be fixed.

There is an update of this topic:

in new version of the Handsontable you have to create your own implementation of ‘Paste’ in the context menu.
Here you can find a tutorial: Clipboard - JavaScript Data Grid | Handsontable