GWT 文本输入具有类似拼写检查的行为?
有谁知道有一个像拼写建议器一样工作的 GWT 小部件吗?
理想情况下,它类似于: http://www.polishmywriting.com/
我需要点击-在用户生成的文本上触发弹出窗口,以便我可以建议替换(我不是构建拼写检查器,而是类似的东西)。 我也非常喜欢 Polishmywriting 菜单的设置方式(当您单击带下划线的单词时)。
有没有一个小部件可以让我制作类似的东西? 基本上我正在尝试克隆 Gmail 和 Polishmywriting 中拼写检查使用的小弹出窗口。
如果没有,我要做的第一步是什么?
感谢您的时间和回答,
DTrejo
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你有运气吗? 我知道已经过去很长时间了,但现在才发现这个。
这是一个非常具体的小部件,因此您可能无法准确找到所需的内容。 在这种情况下,从头开始制作一个可能会成为一项挑战。
您会注意到的第一件事是常规 gwt TextArea 不会完成保存文本的工作。 您将需要更灵活的东西来动态地将可点击标签放入文本本身中。
TinyMCE 是一个独立于平台、基于 Web 的 Javascript HTML WYSIWYG 编辑器控件,以开源形式发布。
http://en.wikipedia.org/wiki/TinyMCE
还有一个可用的 gwt 包装器,因此您可能会发现这很有用:
http://code.google.com/p/tinymce -gwt/
如果在显示拼写检查标记后检查 polishmywriting 编辑器,您会发现它不是 TextArea。 文本是一系列段落,标记的部分是 span 元素。 您可以使用 gwt 轻松访问这些元素,并在其中放置一些单击处理程序以打开弹出窗口。
对于弹出窗口来说,这应该不难。 使用标准 gwt PopupPanel。 弹出面板可以以与页面上显示的其他元素相对的位置显示:
如果您同时发现了一些有用的东西,请随时分享。
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:
If you did find something useful in the mean time, feel free to share.