To my dismay, I found out that the contentEditable=true
attribute does not work as expected on iPhones or iPads.
Is there a way to gracefully degrade a contentEditable div without resorting to a textarea and losing all of the rich DHTML formatting benefits on an iPhone or iPad?
contenteditable
is supported from IOS 5 onward
Go here on your iPad to try it out
http://www.quirksmode.org/dom/execCommand/
I hope you have gone through this(Apple's Technical Notes) and Safari Web Content Guide they put following paragraph under Don’t Use Unsupported iOS Technologies
contenteditable
is not supported in Safari on iPhone OS. If you're using contenteditable
to enable text input within a styled element (for instance, <p contenteditable>
or <div contentediable>
), you can replace this styled element with a styled <textarea
>. In Safari on iPad, iPhone, Mac OS X, and Windows, you can customize the appearance of <textarea>
elements using CSS. If necessary, you can even disable any platform-specific, built-in styling on a <textarea>
by specifying -webkit-appearance: none
.
Thanks,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With