HTML5 contentEditable with jQuery

前端 未结 5 1389
情深已故
情深已故 2021-01-04 00:59

I have some elements that need to have the text inside editable, for this I am using the HTML 5 attribute contentEditable. I can\'t seem to do use jQuery for this using mult

5条回答
  •  长情又很酷
    2021-01-04 02:01

    If I can remember correctly, setting the contentEditable value on the parent would also cause all its children to become editable.

    So doing this:

    $('#container').attr("contentEditable", "true");
    

    Should work.

提交回复
热议问题