I've also been trying to work with selections in GWT and found this
GWT extension:
http://code.google.com/p/rocket-gwt/wiki/Selections
It works with GWT 1.5, I don't know if it has been tested with GWT
1.6. I haven't used it myself
Text selections seems like a fairly important thing, does anyon
found the answer.
FF uses $wnd.getSelection().getRangeAt(0)
thanks for all the help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolki
found the answer.
FF uses $wnd.getSelection().getRangeAt(0)
thanks for all the help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolki
Thanks for the clarification. I am sure I am close now. but still get
an error. my code is
private native Element getSelectedTextParent() /*-{
var range = null;
if($wnd.document.selection){
range = $wnd.document.selection.createRange();
On Jun 5, 11:14 pm, bhomass wrote:
> I looked up some cross browser code. but I am getting different
> results
>
> if (document.getSelection) {
> var range = document.getSelection().createRange();;
> } else if (document.selection && document.selection.createRange) {
> var range = do
On 5 juin, 22:14, bhomass wrote:
> I looked up some cross browser code. but I am getting different
> results
>
> if (document.getSelection) {
> var range = document.getSelection().createRange();;
> } else if (document.selection && document.selection.createRange) {
> var range = docu
I looked up some cross browser code. but I am getting different
results
if (document.getSelection) {
var range = document.getSelection().createRange();;
} else if (document.selection && document.selection.createRange) {
var range = document.selection.createRange();
} else {
var
simply copied it from some
> sample code. this method works find when in hosted mode. but after
> compile and called directly from a browser I get the $doc.selection is
> undefined error.
>
> any one knows what's wrong with this?
>
> sorry if this is second posting. I p
I have a native method which uses
$doc.selection.createRange()
I am not sure why the $ before doc. I simply copied it from some
sample code. this method works find when in hosted mode. but after
compile and called directly from a browser I get the $doc.selection is
undefined error.
any one
works find when in hosted mode. but after
> compile and called directly from a browser I get the $doc.selection is
> undefined error.
>
> any ideas?
>
> Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
I have a native method which uses
$doc.selection.createRange()
I am not sure why the $ before doc. I simply copied it from some
sample code. this method works find when in hosted mode. but after
compile and called directly from a browser I get the $doc.selection is
undefined error.
any ideas
11 matches
Mail list logo