How to make a div with a blinking cursor and editable text without using <input>?

后端 未结 6 1888
既然无缘
既然无缘 2020-12-31 11:34

I need to make a div layer so that when you click on it you will have your cursor there blinking and you can insert/delete text just like

6条回答
  •  独厮守ぢ
    2020-12-31 12:06

    You can make the div editable by setting its contentEditable attribute / property to true. However, for anything that is slightly more powerful or flexible then very basic editing, you might want to look at existing solutions such as:

    • TinyMCE
    • Kevin Roth's RTE
    • The YUI editor

提交回复
热议问题