Here's my code:
var range = editor.selection.getRng();
range.setStart(range.startContainer, 2);
Everything works fine for Chrome, but in Firefox I get error Index or size is negative or greater than the allowed amount. In Chrome, range.startContainer is a text element, and in Firefox it's HtmlParagraphElement.
Why is this happening in FF and how to convert this paragraph tag to a text?
I tried:
range.setStart(range.startContainer.firstChild, 2);
but it doesn't work.