views:

1640

answers:

4

Safari HTML Reference: Supported Attributes says:

contenteditable

If true, the element can be edited on the fly; if false, it cannot.

Availability

Available in Safari 1.2 and later. Available in iPhone OS 1.0 and later.

However, on my iPhone, I can't get it to work. Anyone have success with this?

You can try it with this document (admittedly not pure html, but that document works in desktop Safari, and Chrome and Firefox 3). I haven't been able to get even the simplest html document to be editable in mobile Safari.

+1  A: 

I think this is because editing HTML requires quite an advanced user interface. That's why desktop Safari implements it, while Mobile Safari doesn't.

ilya n.
This is an excuse, not an answer. In desktop Safari, you don't get any fancy controls, just the ability to type into an element. Surely, iPhone can support that.
Andrew Hedges
+1  A: 

iPhone OS 4 Beta 2 does support contentEditable & designMode.

sw
I have the final iOS4 installed on my iPhone and contenteditable does not work. However, when I tap on the div, it gets highlighted (like any other tappable/clickeable element) but that's it.
Jan Kuča
I have iPhone OS 4.1 installed and it doesn't appear to work (at least on the obout HTML editor I'm using)
Micky McQuade
A: 

i don't have os4 beta 2 on my iphone but on the os4 beta 2 emulator it's still business as usual (doesn't work)... please post a video.. i'd kill to see this working because it's the only thing stopping me from claiming iphone/ipad compatibility for my web app.

morgan
contenteditable absolutely does not work on the iphone or ipad.. still.
morgan
+2  A: 

It works, kind of. I thought contenteditable doesn't work on iPhone before. When I set a div to contenteditable I couldn't move the cursor/pointer to where I wanted to move it. But, when I was fiddling around XHTML with contentEditable within iBooks.app on iPad, I found that "execCommand('insertText', null, 'foobar');" worked within Mobile Safari.

freedom