On Apr 26, 11:26 am, kozura <[email protected]> wrote:
> Sure, those sorts of functionality are what this covers, but it's not
> terribly useful for what you're saying to get the cursor relative to
> the basic getText() string.  Sure, you can check the words in the
> string, but how do you then change the actual DOM document without
> affecting other markup?  With my API, you get the actual DOM Text
> element that the selection is in, from which you can get the text of
> the word the user is on or moved from, and surgically make changes
> like surround a word with color style tags.

> On Apr 26, 8:27 am, Navigateur <[email protected]> wrote:
>
> > Oh I have a real need for this. I want certain words to be re-checked
> > against a dictionary when they are edited by the user. This would mean
> > knowing which word is currently being edited and which character is
> > currently being typed or deleted, so for this I would need to know the
> > cursor position (corresponding to the charAt position in the getText()
> > String). Also, to set the colour of that word when the cursor is moved
> > away from it (also needing the cursor position).
>

Can you leverage the browser's spellchecking capabilities?  Firefox 2
and
3 by default check spelling in text areas but not text boxes.  The
user
can set a preference to disable it entirely, while the HTML author can
enable it or disable it for a specific field by giving it the
attribute
spellcheck='true' or 'false'.  Somehow that offends me; why didn't
Firefox namespace it so the page could still be valid XHTML?  IE
still doesn't support spellchecking, even in IE8, but there is a
plugin, ieSpell, that provides it.

Both tools allow custom dictionaries to be set, but I think that's a
browser-wide setting.  I don't know how to tie a specific document
to a specific dictionary.  I also don't know if these tools would work
with GWT widgets, since I'm not sure GWT's Text widgets or
RichTextAreas become in HTML.

Respectfully,
Eric Jablow

-- 
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.

Reply via email to