I'm using the contenteditable attribute as Inputfield for a span and for ussual it worked fine, but now I've the Problem, if I select more than 1 Line in Firefox 93 and try to replace them with another Text, it doesn't works, in Chrome/Safari and even Firefox 92 it works fine. It seems to work only for each single line now.
Could it be a bug, or i'm using it wrong?
var spanContent = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.`;
window.addEventListener('load', function () {
var span = document.getElementById('myEditable');
span.innerText = spanContent;
var range = new Range();
range.setStart(span, 2);
range.setEnd(span, 5);
document.getSelection().addRange(range);
});
<span contenteditable="true" id="myEditable"></span>