4

在下面的示例标记中,使用 html5 时contentEditable="true",是否有一些<span id="cookie">不可编辑的方式?

<div contentEditable="true">
    This text be edited. <span id="nodelete">Except for this text.</span> This can be edited as well.
</div>
4

1 回答 1

1

好的,应位少的要求:

我将使用的解决方案是将内部声明为内spandiv但将其设置contentEditable为 false,就像这样......

<div contentEditable="true">
    This text be edited. <div style="display: inline;" contentEditable="false">Except for this text.</div> This can be edited as well.
</div>
于 2018-03-16T11:13:09.710 回答