0

I have an WYSIHTML5 editor and I wrote a paste handler to paste images in site, as attachments. The problem is that I want the pastehandler to work when I hit paste inside the WYSIHTML5 editor also.

I've registered to paste event like this

 this.editor.observe("paste", this.pasteHandler);

but the problem is that my pasteHandler needs the event that fired it as a parameter, but the observe function it's not sending the event.

How can I send this event from WYSIHTML5 editor to my paste handler?

Cristian Holdunu
  • 1,880
  • 1
  • 18
  • 43
  • would this help? http://stackoverflow.com/a/16221918/1771795 – Omar Jun 20 '13 at 09:02
  • sorry but it's not working. I tried to bind the event on the editor's text box, but the event it's not dispatched. Using the all above, the pasteHandler gets called, but has no parameter (event) so I can't access clipboardData. – Cristian Holdunu Jun 20 '13 at 09:08
  • can you show your html code? – Omar Jun 20 '13 at 09:08
  • I don't believe it's necessary. I only have an ordinary WYSIHTML5 editor that I have to put it listen to a paste event. As I said, i don't know how I can pass the original event as a parameter to my pate handler. – Cristian Holdunu Jun 20 '13 at 10:37

0 Answers0