views:

503

answers:

1

Hello,

Does anyone know of a GWT widget that works like a spelling suggestor?

Ideally it would be similar to this: http://www.polishmywriting.com/

I need a click-triggered popup on user generated text so that I can suggest replacements (I am not building a spell-checker, but something similar). I also really like the way the polishmywriting menu is set up (when you click on an underlined word).

Is there a widget that would allow me to make something similar? Basically I'm trying to clone the little popups used by spellchecking in Gmail and polishmywriting.

If not, what would be my first step to make it?

Thanks for your time and answers,

DTrejo

+1  A: 

Hello.

Have you had any luck yet? I know it's been quite a lot of time, but found this just now. It is a very specific widget, so maybe you won't be able to find exactly what you are looking for. In that case, making one from scratch might prove as a challenge.

The first thing you will notice is that a regular gwt TextArea won't do the job of holding the text. You will need something more flexible to dynamically put clickable labels in the text itself.

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control, released as Open Source.

http://en.wikipedia.org/wiki/TinyMCE

There is also a gwt wrapper available, so you might find that useful:

http://code.google.com/p/tinymce-gwt/

If you check the polishmywriting editor after the spell checking markup is displayed, you will notice it is not a TextArea. The text is a series of paragraphs and the labeled parts are span elements. This are the elements you can easily access with gwt and put some click handlers there to open the popup.

And for the popups, it shouldn't be difficult. Use a standard gwt PopupPanel. The popup panel can be displayed in a relative position to other elements displayed on the page:

popup.showRelativeTo(otherElement);

If you did find something useful in the mean time, feel free to share.

igorbel
Hey igorbel, since posting this I've dropped the project, but it sounds like if I were to follow your response then I'd be able to make this project work. Thanks!
DTrejo