Which elements can be safely made contenteditable?

后端 未结 2 686
礼貌的吻别
礼貌的吻别 2020-12-29 06:07

I\'ve been working with contenteditable recently within a HTML5 page and encountering bugs when using it with certain elements, and I\'d like to know where and how I can act

2条回答
  •  暖寄归人
    2020-12-29 06:37

    Since this is an evolving feature with, apparent, low priority from the browser vendors support has been sketchy and regressions not uncommon. The current state of affairs is evolving, so check the Googles, CanIUse etc and make sure support is there for your sites visitors, everything else is moot ...

    Support in Firefox seems to be solid, at least for some elements, now https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content It works well in Chrome as well as far as my testing goes. And CanIUse looks good: http://caniuse.com/#feat=contenteditable

    There are a number of different bugs related to the feature in the different browsers though, but for simple use cases it should be ok now, as of August 2016.

提交回复
热议问题