开发者

GWT Spell Check

开发者 https://www.devze.com 2023-04-10 00:57 出处:网络
I would like to implement a \"spell check\" for my GWT rich text area.I do understand that Firefox and other browsers automatically 开发者_开发技巧highlight words with misspellings, but I need to be a

I would like to implement a "spell check" for my GWT rich text area. I do understand that Firefox and other browsers automatically 开发者_开发技巧highlight words with misspellings, but I need to be able to warn the user before they submit a form that there are potential misspellings if they ignore the "squiggles".

Is it possible to use a javascript call to see if the default Firefox spell checker has detected errors? I could use that to stop the form from being submitted with misspellings.

Any thoughts out there?

Thanks, Jeff


Firstly, you cannot guarantee that your user is using Firefox (or a browser that has spellcheck). Secondly, I do not believe that you can access most browser-level components from your JavaScript code.

You can find spellcheck libraries and call them accordingly. See SpellCheck.java as a starting point, but I'm sure there are many more.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号