I am modifying the inner html of a contenteditable to wrap a span
around certain text that the user types. This is working great, except every time the user creates a line break, the new line also comes across as a span
with the same id and styling as the span they were just typing in.
I have seen prevent contenteditable mode from creating <span> tags but in that case, they are trying to remove all spans (or at least that's what everyone's advising them to do). I however, need the spans that I intentionally create, I just don't want them multiplying.
I'm using Chrome 61 right now, but I need solutions that will not produce problems with Chrome, FireFox, Edge, IE 11, or Safari since I need to support those browsers.