16

UIWebView (iOS 5.0) does not show the red-squiggly spelling correction underlines for this:

id html= @"<div spellcheck=\"true\" contenteditable=\"true\"></div>"
[webView loadHTMLString:html baseURL:nil];

Is it possible to get them?

Xavi Valero
  • 2,047
  • 7
  • 42
  • 80
mxcl
  • 26,392
  • 12
  • 99
  • 98
  • what things do you expect to be spell checked? the entire contents of the HTML file or just the editable text fields or? – Michael Dautermann Nov 15 '11 at 16:17
  • The entire `contenteditable` div. The HTML 5 spec says the markup above should work. But it doesn't. – mxcl Nov 15 '11 at 17:24
  • Do you require spell check (autocorrect) for any textfield entry in text box, which is available on html page? Am I getting you correctly? If is it so, then might be ans given below will be helpful to you. – Mrunal Nov 16 '11 at 04:39
  • 1
    @MaxHowell have yo figured this out yet? – ma11hew28 Jan 22 '12 at 14:28

1 Answers1

1

There are some HTML tag properties available by Apple Safari Guidelines

autocomplete: If off, deactivates automatic completion for an input element; If on, activates automatic completion for the element. Related Tags “input” Availability Available in Safari 1.0 and later. Available in iOS 1.1.1 and later.

autocorrect: If off, deactivates automatic correction for a form or input element; If on, activates automatic correction for the element. Availability Available in iOS 1.1.1 and later.

Hope this might be useful to you.

Mrunal
  • 13,982
  • 6
  • 52
  • 96
  • Thanks, but it doesn't seem to work. I now have: `
    `. I also tried changing the tag to `form` and `input` in case that helped.
    – mxcl Nov 17 '11 at 16:30
  • According to the linked Safari Guidelines, `autocomplete` and `autocorrect` only work on input and form tags (such as: ``). They work in that regard, as they control autocompletion and autocorrection. There is currently no 'spellcheck' option supported by webkit, as per the link you provided. – Darc Feb 08 '12 at 01:02