在基于iframe的文本编辑器中禁用Firefox和Chrome拼写检查 [英] Disabling Firefox and Chrome spell checking in iframe-based text editors

查看:295
本文介绍了在基于iframe的文本编辑器中禁用Firefox和Chrome拼写检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于如何通过使用 spellcheck ='false'来禁用html textarea 元素中的拼写检查, $ C>。但是,要使文本区域具有更高级的功能,必须使用 iframe designMode =on a href =http://www.evagoras.com/2011/02/02/web-based-content-editor-using-iframe/ =nofollow>这个页面,这是一个方法RichTextArea是在GWT中实现的),并且我在这个主题上找不到一个帖子。

There is a lot of info around about how to disable spell checking in html textarea element by using spellcheck='false'. However to have text area with more advanced capabilities, one must use iframe with designMode = "on" (see e.g. this page, this is a way that RichTextArea is implemented in GWT) and I couldn't find a single post on that topic.

事实证明,Firefox检测到这样的高级文本区域并启用其拼写检查在他们中。您可以通过访问Firefox / Chrome的此页并输入一些内容到文本字段。如果您检查html源代码Firebug,你会看到没有 textarea 标记,但FF拼写检查仍然是活动的。我设法禁用它的唯一方法是设置 designMode off 但是...我需要它是 on

It turns out that Firefox detects such advanced text areas and enables its spell checking in them. You can see it live by visiting this page from Firefox/Chrome and entering some content to text field. If you inspect html source code with e.g. Firebug, you'll see no textarea tag, yet FF spell checking is still active. The only way I managed to disable it was setting designMode to off but... I need it to be on.

问题是:是否有可能禁用FF基于iframe的文本区域的拼写检查,没有设置designMode =off?

推荐答案

只要设置 spellcheck =false 到iframe中的 body 元素。在FF中此处

Just set spellcheck="false" onto the body element in the iframe. Works here in FF.

这篇关于在基于iframe的文本编辑器中禁用Firefox和Chrome拼写检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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