replace innerHTML in contenteditable div

The problem is that Rangy’s save/restore selection module works by inserting invisible marker elements into the DOM where the selection boundaries are and then your code strips out all HTML tags, including Rangy’s marker elements (as the error message suggests). You have two options: Move to a DOM traversal solution for colouring the numbers rather … Read more