在Sencha Textarea进行拼写检查

时间:2013-07-09 06:38:02

标签: javascript html5 web-services sencha-touch-2 spell-checking

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

textarea字段如下:

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


            },

我尝试使用

autoCorrect:true 

没有帮助。可以

  spellcheck="false" 

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

2 个答案:

答案 0 :(得分:0)

现代浏览器支持拼写检查属性,例如,您可以拥有可编辑的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);

答案 1 :(得分:0)