There is an issue with the string displayed on the spectrum is that it can contain <sub> or <i> and <sup> that is displayed rather than rendered.
I guess the faster way to solve this issue is to remove the html code when overlaying over the spectrum. I guess in the future we should again consider foreignObject but we would loose compatibility with inscape. Not sure about adobe illustrator if somebody could test it:

To remove the html before display over the spectrum (Copy the assignment should still have the html) can be something like:
input.replace(/<[^>]+>/g, '')
There is an issue with the string displayed on the spectrum is that it can contain
<sub>or<i>and<sup>that is displayed rather than rendered.I guess the faster way to solve this issue is to remove the html code when overlaying over the spectrum. I guess in the future we should again consider foreignObject but we would loose compatibility with inscape. Not sure about adobe illustrator if somebody could test it:
To remove the html before display over the spectrum (Copy the assignment should still have the html) can be something like:
input.replace(/<[^>]+>/g, '')