div content editable with placeholder [duplicate]

北慕城南 提交于 2020-06-09 03:58:08

问题


I am trying to create a editor like LinkedIn create post component. There I want to keep non removable <p><br></p> content like below.

<div #mainEditor contenteditable="true"><p><br></p></div>

Also want to show a placeholder when editor has no value. Just inspect LinkedIn editor and see my scenario. I have no idea and unable to figured out how to keep non removable <p><br></p> with a placeholder.

Could anyone has an idea how they are doing that?

来源:https://stackoverflow.com/questions/62175319/div-content-editable-with-placeholder

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