Multi color Text Highlighting

I'm working on a project where we want to allow respondents to highlight in Green or Red, based on this mobile friendly response option https://community.sawtoothsoftware.com/lighthouse-studio/post/highlight-custom-ranges-for-mobile-rtWwpGo6C8vzWTy.

Has anyone done multi-color text highlighting custom ranges before?

I've made adjustments to add HighlightA and HighlightB, but it's not working as expected, with the highlights being always applied as color A and undoing changes them to color B. It also seems I've missed the part of the code that moves the highlighted text to appropriate variable so the highlights aren't being stored at all.

2 replies