En un div editable, cuando selecciono una oración dentro de un elemento con oyentes y muevo la oración a otro lugar, pierdo estos oyentes.
Sabes por qué ?
https://jsfiddle.net/er069bsj/
<div contenteditable=true> If you move by selection this sentence "LOREM <span id="1" class="element" onmouseover="console.log('mouseover word 1');this.style.backgroundColor='yellow'" onmouseout="console.log('mouseout word 1');this.style.backgroundColor='red'">WORD 1</span>FINIBUS", you lose the listener.<br> Other example with this sentence "NNULLAM <span id="2" class="element" onmouseout="console.log('mouseout word 2');this.style.backgroundColor='red'">WORD 2</span>METUS".Por ejemplo, puede mover la oración LOREM WORD 1 FINIBUS en mi ejemplo de Fiddle y puede ver que el mouseover y el mouseout no funcionan después del movimiento.