在contenteditable div中的hr接受文本

时间:2018-06-13 18:10:19

标签: html css

如果我们内部有contenteditable divhr,则可以点击hr并在其中写入文字。

在此代码块中查看它的实际操作:

<div contenteditable="true">
  Hello
  <hr contenteditable="false">
  There
  
  <br><br>
  <button contenteditable="false">Cannot edit this</button>
</div>

我们可以在可编辑的div中禁用可编辑的HR吗?

Cursor in an uncomfortable position

注意:您必须单击确切的HR线。 我添加了按钮,以表明如果其自身的contenteditable设置为false,则contenteditable不会影响它。

0 个答案:

没有答案
相关问题