Hi Vikram,
Thanks for your reply. My requirement wass basically to let user can
select/highlight some of the text from RichTextArea. user can use keyboard
or mouse. Once the text is selected, I can determine what text is selected
or highlighted in the RichTextArea.
I have written following JSNI method so far it is working fine on Hosted
mode, FireFox and IE as well.
public static native String getSelectedValue(Element e)/*-{
if (e.contentWindow.document.selection) {
return e.contentWindow.document.selection.createRange().text;;
}
else{
return e.contentWindow.document.getSelection();
}
}-*/;
On Sun, Nov 1, 2009 at 6:32 PM, sathya <[email protected]> wrote:
>
> What you mean by selected value from RichTextArea component?
>
>
> On Oct 31, 4:42 pm, Taimuri <[email protected]> wrote:
> > I am new to GWT. Can someone please tell me how can I get selected
> > value from RichTextArea component? I was trying to find a method like
> > getSelectedValue, may be I would be required to write my own JSNI
> > method, if Yes then how?
> >
> > I will be grateful to you guys, as this is kind of urgent for me :)
> >
>
--
Warm Regards,
Taimur Mirza
[To predict the behavior of ordinary people in advance, you only have to
assume that they will always try to escape a disagreeable situation with the
smallest possible expenditure of intelligence. - Friedrich Nietzsche]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---