Hi!
I cannot find any information on how to capture and handle the "cut" event before (or while) it occurs... I would greatly appreciate any information on this...
I can capture the "paste" event like this, but it does not work for "cut":
ThisEditor.on('paste',function(event)
{
if (<user can make changes> == false) {
event.stop();
event.cancel();
}
})
Note that I don't mean pressing the "CTRL-X" or "SHIFT-DELETE" keys here; those actions I can capture and handle. What I can't capture and handle is when a user highlight's text in a ckEditor, right-click's on the ckEditor, and clicks "Cut" in the popup window.
Thanks in advance for your help!
I cannot find any information on how to capture and handle the "cut" event before (or while) it occurs... I would greatly appreciate any information on this...
I can capture the "paste" event like this, but it does not work for "cut":
ThisEditor.on('paste',function(event)
{
if (<user can make changes> == false) {
event.stop();
event.cancel();
}
})
Note that I don't mean pressing the "CTRL-X" or "SHIFT-DELETE" keys here; those actions I can capture and handle. What I can't capture and handle is when a user highlight's text in a ckEditor, right-click's on the ckEditor, and clicks "Cut" in the popup window.
Thanks in advance for your help!
Re: Capture the "cut" event
Look at the cut/paste plugin and see what event is bound to the contextMenu event. You *should* be able to watch for that event. Better yet, checkout this patch file which allows you to watch events with firebug open.
viewtopic.php?f=11&t=18885
(Although firebug always has to be open, so it's just for testing)
Re: Capture the "cut" event
could not see event in firebug
Thanks