I found a solution adopting
http://stackoverflow.com/questions/10317644/how-to-make-gwts-richtextarea-detect-content-pasting-and-cutting-events
IFrameElement iFrame = IFrameElement.as(richTextArea.getElement());
>
>
> //listen for paste event
> addDropHandler(iFrame);
>
> /**
> * Add a listener for the paste event
> * @param iframe
> */
> private native void addDropHandler(IFrameElement iframe)
> /*-{
> if(iframe == null)
> return;
>
> var _this = this;
>
> var pasteFunction = function(e)
> {
> [email protected]::handleDrop()();
> }
> if (iframe.contentWindow)
> iframe.contentWindow.addEventListener('drop', pasteFunction, true);
>
> }-*/;
>
> public void handleDrop() {
> Window.alert("Drop!");
> }
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.