基于Java的Web应用程序的拼写检查器 [英] Javascript based spell-checkers for web applications

查看:80
本文介绍了基于Java的Web应用程序的拼写检查器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚收到要求在我们正在创建的Web应用程序上实施拼写检查的要求.我对FF,Chrome,IESpell等一无所知,但这是客户的要求.

I have just received a requirement to implement spell checking on a web application that we are creating. I know all about FF, Chrome, IESpell, etc. but this one is the client's request.

鉴于实现此类(实时)功能的唯一方法是使用JavaScript库,我想知道是否有人尝试过任何开源程序?他们有什么好处吗?通常,关于这种方法可以说出什么类型的好/坏事情?

Given that the only way to implement something like this (real time) is with JavaScript libraries, I want to know has anyone tried any of the open source ones? Were they any good? In general, what types of good/bad things can be said about this approach?

我想进入这个问题,我反对这样做,因为最终用户的机器要做的只是更多的工作而几乎没有收益.我想我的意思是这将是一个脚本,它不断地在执行某件事,而不是AJAX请求或快速的div更新,这可能会导致我们的应用程序看上去性能很差,即使它是检查每个输入的拼写检查器页面上的字段.似乎也有很大的空间可能会出现JavaScript错误,从而使整个网站停顿.

I guess going into this, I am against it as it is just more work for the end users's machine to do for little benefit. I guess what I mean by that is that it will be a script that is constantly doing something as opposed to an AJAX request or a quick div update which could lead to seemingly bad performance for our application even though it is a spell checker checking every input field on the page. It seems also that there is lots of room for a javascript error to stall the entire site.

有想法吗?

推荐答案

我同意,如果拼写检查器始终在运行,则它应该是本机检查器.但是,如果客户需要显式的拼写检查器,则应将其实现为需要时单击的按钮.在用户停止键入一定时间后,XHR请求也可能值得激发,就像SO在撰写文章时突出显示语法一样.

I agree that a spell-checker should be native if it's running at all times. If the client demands an explicit spell checker, though, it should be implemented as a button to be clicked when needed. It might also be worth firing that XHR request after the user has stopped typing for a certain amount of time, like SO does for syntax highlighting when writing a post.

我在学校报纸的后端拼写检查器中使用了截止日期" ,因为它功能强大,还检查了简单的语法错误,并且与TinyMCE轻松集成.还有一个 jQuery插件可以与服务集成.

I used After the Deadline for my school newspaper's back-end spell-checker, since it is powerful, checked for simple grammar errors as well, and integrated easily with TinyMCE. There's also a jQuery plugin to integrate with the service.

这篇关于基于Java的Web应用程序的拼写检查器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆