ios - 为 UIWebView 中的 contenteditable div 禁用自动大写

标签 ios cocoa-touch uiwebview

我有一个 UIWebView,它加载一个带有内容可编辑的 div 的基本 html 页面。此 div 具有以下属性:

<div id="editor" 
     contenteditable="true" 
     autocapitalize="none" 
     autocorrect="off" 
     autocomplete="off">#CONTENT#</div>

但是,在 iOS 5 和 iOS 6 中,句子仍然大写。

我尝试将 autocapitalize 设置为 off,但随后根据 Safari HTML Reference 将其设置为 none , 但仍然没有喜悦。

最佳答案

autocapitalizeautocorrectautocomplete 仅支持输入和表单标签。请参阅文档中的相关标签

关于ios - 为 UIWebView 中的 contenteditable div 禁用自动大写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15899531/

相关文章:

iphone - 从 iPhone 中的 url 加载图像,只有在很小的情况下

ios - 我可以在 UIWebView javascript 注入(inject)中访问其他域的其他框架中的 HTML DOM 吗?

iphone - 如何取消在 UIWebView 中发出的请求?

ios - UICollectionView:重新加载数据调用 numberOfItemsInSection 但不是 cellForItemAtIndexPath

iphone - 关闭我的应用程序 (OSX) 后继续收到 "This NSPersistentStoreCoordinator has no persistent stores. It cannot perform a save operation."

objective-c - 更改 NSButton 标题位置

ios - xcode - 从本地 html 文件加载 UIWebView

ios - 如何让 cocoapods 只为设备构建?

ios - 在 Swift 中,如何在删除 ARSCNView 后让内存恢复正常?建筑套件

ios - 如何在 Swift 中将 TextField 添加到 UIAlertController