简体   繁体   English

在混合移动应用程序中启用了拼写检查

[英]Spellcheck enabled in Hybrid Mobile application

I am building a mobile application that uses the following technologies 我正在构建使用以下技术的移动应用程序

  • HTML5 / CSS3 / JavaScript HTML5 / CSS3 / JavaScript
  • jQuery and jQuery Mobile jQuery和jQuery Mobile
  • Cordova 科尔多瓦

And I want to enable the spelling autocorrect that autmoatically fixes obvious spelling mistakes 我想启用自动纠正明显的拼写错误的拼写自动更正

such as fixing Teh automatically into The 例如将Teh 自动修复为

What kind of a plugin will do the job? 什么样的插件可以完成这项工作? Or what should I add in my code? 还是我应该在代码中添加什么?

The HTML5 of my mobile application 我的移动应用程序的HTML5

<textarea name="textarea-1" id="desiredpart" spellcheck="true" autocorrect="on" ></textarea>

And then in my JavaScript 然后在我的JavaScript中

$( document ).ready(function( ) {
    $desiredpart = $("#desiredpart"); 
    $desiredpart.attr("spellcheck","on").attr("autocorrect","on");
});

And my JavaScript is imported after the jQuery mobile file loads. 而且我的JavaScript是 jQuery移动文件加载导入的。
I read that jQuery mobile disables autocorrect and spellcheck. 我读到jQuery mobile禁用了自动更正和拼写检查。 Should I modify the jQuery mobile source code? 我应该修改jQuery移动源代码吗?

Below is a snippet of the code from http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.js 以下是http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.js中的代码段 jQuery Mobile自动更正功能 You can playaround these lines and see the results in various devices. 您可以在这些行之间四处移动,并在各种设备中查看结果。

I would suggest you stick to the HTML attribute option as it has lower overhead on the DOM. 我建议您坚持使用HTML属性选项,因为它在DOM上的开销较低。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 混合密码学在混合移动应用中的应用 - Hybrid Cryptography in hybrid mobile application 混合移动应用程序中的XMLHttpRequest异常101 - XMLHttpRequest Exception 101 in hybrid mobile application Google Maps在混合移动应用程序中缓存切片 - Google Maps caching tiles in hybrid mobile application 在 Hybrid 移动应用中使用 VueJs 实现谷歌地点 - Implementation of google places using VueJs in Hybrid mobile application 苹果商店准则。 混合移动应用程序中的外部JavaScript文件 - Apple Store Guidelines. External JavaScript files in hybrid mobile application 如何使用Cordova处理混合移动应用程序的后退按钮功能 - How to handle the back button functionality for Hybrid mobile application using cordova 如何在 Ionic For Hybrid Mobile Application 中添加多个 HTML 页面? - How to add multiple HTML pages in Ionic For Hybrid Mobile Application? Chardin Js,混合Cordova移动应用程序-“未定义”不是一个功能 - Chardin Js , Hybrid Cordova mobile application - “undefined” is not a function 混合移动应用程序在添加cordova.js时崩溃 - Hybrid mobile application crash while adding cordova.js 如何在混合移动应用程序中将材料设计精简版中的FAB按钮与jQuery移动代码集成? - How to integrate FAB button in material design lite with jQuery mobile code in hybrid mobile application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM