Open zachberry opened 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep our backlog under control, but we thank you for your contributions.
Related: #1272
The selected region was given a color of red in the visual editor:
That resulted in this in the viewer, which shows an extra
+ b
The resulting XML:
And JSON:
Note that colored inline equations do work if the whole equation is selected:
We have the same issue when bolding text, and I assume with all the other styles although I didn't exhaustively test every one.
I think there's two possible solutions:
I'm leaning towards 2 being the better option, however we'd need a modular way to transform styles - once the author sets latex content to a style we'd need to be able to expand the colored area to include all of the latex content. It would probably also be good to enforce that in StyleableText / StyleList, so if an author incorrectly styled a portion of latex content in XML/JSON the style would automatically be expanded to the latex (I don't think we'd want to expand the selection though, unless necessary). That would want to be a one-time operation before rending text content in the viewer, so it doesn't have to calculate the expansion on every render, but we also may want to hold off doing it until the render is needed.
Additionally, colors should probably be visible in the editor when applied to latex content. Currently it always shows as blue text.