Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-20 Thread Brandon Donnelson
Interesting. Thanks for the info. Its been a challenge to try to get an elegant ui solution implemented. Due to the Clipboard API access via the dom in most platforms implementing a solution easily sucks. As far as I can tell, implementing a paste into rich text is going to be impossible, that is,

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-18 Thread darkflame
Funny, thought I replied to this :-/ Anyway, fantasic work. I did a quick implementation in my app and found the following: Chrome - works flawlessly. At least data cut and paste from open office is stripped clean nicely. Firefox - as expected, workaround needed. Opera - unfortuntely data isnt st

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-05 Thread Brandon Donnelson
Here is my latest rendition. I can't find a perfect solution due to mozilla clipboard data access. But I found a workaround using doubleclick on the RichTextArea. I want to add later, a warning for firefox pasters. So far this is what I have. http://code.google.com/p/gwt-examples/wiki/DemoGWTT

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread Brandon Donnelson
I have solved the word data pasting problem. Wahoo! Now to set it up in a demo. http://code.google.com/p/gwt-examples/source/browse/trunk/GoneVertical-Core/src/org/gonevertical/core/client/input/richtext/WiseRichTextArea.java#179 Brandon Donnelson http://gwt-examples.googlecode.com -- You re

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread Brandon Donnelson
Oh yea, I forgot to say thanks :) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/tZ4T-TeWdWYJ. To post to this group, send email to google-web-

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread Brandon Donnelson
I ripped the source out so I could create the work around needed for a project. I'll submit a issue later. http://code.google.com/p/gwt-examples/source/browse/#svn%2Ftrunk%2FGoneVertical-Core%2Fsrc%2Forg%2Fgonevertical%2Fcore%2Fclient%2Finput%2Frichtext%2Fworkaround - I just added to the hookEv

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread darkflame
Fantastic work! I cant try it out right now, but I've bookmarked for later. This is going to be VERY usefull. You might also have been the first guy online to work this out based on my (long) Googleing on this over the last month or so ;) On Nov 2, 3:33 am, Brandon Donnelson wrote: > I found a n

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-01 Thread Brandon Donnelson
I found a nice hack to get the onpaste to work: I modified the source to try it. // my inherited RichTextArea public WiseRichTextArea(boolean hideBorderUntilHover, boolean grow) { super(); setup(hideBorderUntilHover, grow); } private void setup(boolean hideBorderUntilHover, boole

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-01 Thread Brandon Donnelson
So far I found where I can intercept the Paste event: // RichTextAreaImplSafari.java source hack @Override protected native void hookEvents() /*-{ var elem = th...@com.google.gwt.user.client.ui.impl.RichTextAreaImpl::elem; var wnd = elem.contentWindow; elem.__gwt_handler = functio

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-10-31 Thread darkflame
As I suspected, your trying to solve the exact same problem I had. People pasteing from Word into my app produced a crazy amount of junk formating I wanted to get rid of ;) I managed to deal (more or less) with it in normal TextBox's, but not RTF. Btw, if you run into an Opera compatibility issue

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-10-31 Thread Brandon Donnelson
I setup the source to look deeper and I'm looking at the source to see how the build it. I'm looking at two approaches to get to the iframe, one try accessing it through JSNI, find the iframe in the DOM..., 2, find how the source is passing events through the iframe and replicate that with onpa

Re: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-10-31 Thread darkflame
I was trying to work this out a few months back but gave up. If anyone has a answer Id be interested too hear as well. I suspect somehow you have to tie it to the inner iframes DOM, but I dont know how to do that. (in fact, not even sure if you can get the inner DOM of a iframe :-/) On Oct 30, 4:

I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-10-30 Thread Brandon Donnelson
I'm trying to observe the OnPaste Event but can't seem to hook it into the RichTextArea and not sure why yet. http://code.google.com/p/gwt-examples/source/browse/trunk/GoneVertical-Core/src/org/gonevertical/core/client/input/richtext/WiseRichTextArea.java#178 - source (snippet below) //