浏览器功能检测:拼写检查?

发布于 2024-07-30 05:23:23 字数 461 浏览 5 评论 0原文

所有不错的浏览器(Chrome、FX 等)现在都支持内置拼写检查。

然而,流行但垃圾的 IE 轴却没有(甚至 IE8 也没有——毫无意义的“加速器”:是的,急需的字典支持:否)。 除非你下载一个优秀的免费插件,但你不能指望企业用户这样做。

我们的客户希望在我们提供的企业网络应用程序中进行拼写检查,因此我们购买了第三方拼写检查组件以使他们满意。 它可以工作,但并不是很好 - 特别是与浏览器内置的任何内容相比。

它也看起来像 Word 2000 中的拼写检查对话框(可能是当前开发时的版本)。 对于我们的客户来说,这并不是什么问题,其中一半的客户还停留在 Office 2000 和 IE6 上。

我只想在用户没有内置拼写检查时启用此组件。

有谁知道一种方法来检测这个?

All the decent browsers (Chrome, FX, etc) now support built-in spell checking.

However the popular but rubbish axis of IE doesn't (not even IE8 - pointless 'accelerators': yes, much needed dictionary support: no). Unless you download an excellent free plugin, but you can't expect corp users to do that.

Our clients want spell checking in the enterprise web app that we supply, so we bought in a 3rd party spell checking component to keep them happy. It works, but isn't terribly good - especially when compared to anything built in to the browser.

It also looks like the spell check dialog in Word 2000 (probably current back when it was developed). Not such a problem for our clients, half of whom are stuck on Office 2000 and IE6.

I want to only enable this component when the user doesn't have built in spell checking.

Does anyone know a way to detect this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心如狂蝶 2024-08-06 05:23:23

不确定即使使用 browsercap 或 Microsoft 浏览器定义文件架构< /a>,如上所述,它超出了允许的范围。

您是否考虑过使用服务器端拼写检查器? 因此,如果他们愿意,他们可以使用客户端,或者像 GMail 中那样单击拼写检查按钮。 这也意味着您可以控制对字典的任何更新。

Not sure if this is possible even with something like browsercap or Microsoft Browser Definition File Schema, as mentioned above it is kind of outside the allowed scope.

Have you considered just going with a server side spell checker? So they can use the client if they like or click the spell check button like in GMail. This also means that you can control any updates to the dictionary.

少跟Wǒ拽 2024-08-06 05:23:23

您已经知道哪些浏览器有内置支持,哪些浏览器没有,因此您可以使用某种形式的 浏览器嗅探来决定是否启用拼写检查组件。

您还可以尝试询问您的用户是否已经启用了某些拼写检查功能,并让他们回答是/否/不知道。 如果他们不知道,请退回到自动检测。 这比仅使用嗅探更好,因为已知嗅探在某些情况下是不可靠的。

如果可能的话,检测属于浏览器 UI 一部分的内容是很困难的。 由于浏览器的安全策略,网站无法访问可能会暴露对功能检测有用的内容的大部分 API。 即使安全性不是问题,您可能仍然会面临每个浏览器都有一个不同的 API,因为内部浏览器机制尚未标准化。

You already know which browsers have built-in support and which browsers don't so you may use some form of browser sniffing to decide whether you enable the spell-checking component or not.

You may also try to ask your users if they already have some spell-checking enabled and let them answer Yes/No/Don't know. If they don't know, fall back to automatic detection. This is better than using sniffing only because sniffing is known to be unreliable in some circumstances.

Detecting things that are part of a browser's UI is hard, if possible. Due to browsers' security policies, a web site can't access most part of the API that could expose something useful for feature detection. And even if security was not a problem, you would probably still face one distinct API for every browser, since internal browser mechanics are not standardized.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文