What's the use of <element contentEditable=“true”> in html?

你离开我真会死。 提交于 2019-12-20 21:55:11

问题


It seems it allows you to edit the content of an element, but what is actually happening? What's the use of this property?

EDIT: see here


回答1:


This is usually used for rich text input. While regular form elements like <input type="text"/> don't provide real rich text editing options, elements with contentEditable set to true can. Most rich text editors (e.g. FCK Editor) available for the web are built using an <iframe/> with contentEditable set to true.




回答2:


contentEditable=true for elements make them editable. You can write/edit text in those elements as if they are a textarea or a text field.



来源:https://stackoverflow.com/questions/1654938/whats-the-use-of-element-contenteditable-true-in-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!