nytimes / ice

track changes with javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Track changes not working for CUT and PASTE

patrickDucastel opened this issue · comments

Hi
I try to use tinymce for track changing on my textarea.
When I press keys for adding text, the new text is highlighted, fine...
But if I use PASTE for adding text, the new text appears without any track.
The same for delete : if I use the DELETE key, the old text is still there highlighted and throughlined.
But if I use CUT, the text disappears without any track.
I have tried to prohibit CUT and PASTE by using the code :
$(document).ready(function () {
$(idtextarea).bind('cut paste', function (e) {
e.preventDefault();
alert('NO cut paste');
});
});

But then track changes does not work anymore!!!
So I have 2 questions :
Is it possible to make track changes working for cut and paste
If yes, how. If no, is it possible to prohibit cut and paste on textarea.
If yes, how. If no, it is not smart....
Thanks for your help

I had exactly the same problem. I tried to fix this when I was working on
this over a year ago but I never fixed it.
On Mar 17, 2016 1:26 AM, "patrickDucastel" notifications@github.com wrote:

Hi
I try to use tinymce for track changing on my textarea.
When I press keys for adding text, the new text is highlighted, fine...
But if I use PASTE for adding text, the new text appears without any track.
The same for delete : if I use the DELETE key, the old text is still there
highlighted and throughlined.
But if I use CUT, the text disappears without any track.
I have tried to prohibit CUT and PASTE by using the code :
$(document).ready(function () {
$(idtextarea).bind('cut paste', function (e) {
e.preventDefault();
alert('NO cut paste');
});
});

But then track changes does not work anymore!!!
So I have 2 questions :
Is it possible to make track changes working for cut and paste
If yes, how. If no, is it possible to prohibit cut and paste on textarea.
If yes, how. If no, it is not smart....
Thanks for your help


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#127