在Sencha文本区域进行拼写检查

Spell check in Sencha Textarea

本文关键字:检查 Sencha 文本 区域      更新时间:2023-09-26

我想在我的sencha应用程序中对文本区域字段进行拼写检查。

文本区域字段如下:

            {
                xtype:'textareafield',
                id:'txt',
                height:220,                
                autoCorrect:true,

            },

我试过使用

autoCorrect:true 

这也于事无补。Can

  spellcheck="false" 

html属性?是否有任何部署的WEBSERVICE可用,以便我可以连接并获取拼写错误的单词?感谢您的帮助。

现代浏览器支持拼写检查属性,因此例如您可以有一个可编辑的p标记:

<p contenteditable="true" spellcheck="true">This is a paragraphh. It is editable. Try to change the text.</p>

拼写错误的单词"paragraphh"将用红色下划线。

您可以使用JavaScript:动态添加这样的属性

myTextArea.setElementAttribute("spellcheck", true);

客户端拼写检查Javascript:

http://www.chrisfinke.com/2011/03/31/announcing-typo-js-client-side-javascript-spellchecking/