A little while ago, I was having problems with drag n' drop and CKEditor. Turns out there is a bug (not yet solved) with the editor preventing me from working with the dragstart
event without reattaching it every time I destroy and recreate an instance of CKEditor. For more details on the bug, please refer to this question
By doing this, the dragstart
event ends up firing more and more times each time I recreate an editor instance.
I would like to know if is there a way to detach the event as I am recreating the editor instance, so it fires only once (since I have to reattach it every time), just as a workaround until the bug is fixed.
I was suggested to do the following:
You can put:
CKEDITOR.document.getById('contactList').on('dragstart', ... );
inside the plugin init method. After such change drag and drop should work, but dragstart will be fired multiple times. You can detach thedragstart
event, before you attach it again end everything should work fine.
I have searched the docs and found nothing about it, so I'd be glad if anyone could help me.
Thank you.