Why doesn't @contenteditable work on the iPhone?

前端 未结 6 960
无人及你
无人及你 2020-12-09 05:05

Safari HTML Reference: Supported Attributes says:

contenteditable

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

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 05:46

    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.

提交回复
热议问题