this is a posible duplicate of: Rangy: Adding multiple highlights for the same piece of text
But this question got no answers.
The problem is that the Rangy API puts a lot of span tags when applying a class in an element that already had a class placed by Rangy, such as color or background-color.
i.e:
<p><span class="redBackground">texto de ejemplo para probar rangy</span></p>
becomes (when i apply other background colors):
<p><span class="redBackground">text</span><span class="blueBackground">o de ejemplo</span><span class="orangeBackground"> para proba</span><span class="orangeBackground">r ran</span><span class="redBackground">gy</span></p>
in the case of "orangeBackground" class, i dont see the reason of having multiple spans, is it possible to force Rangy not to place so many spans?