I've almost finished a plugin that will allow text to be highlighted in different colours using <MARK></MARK>
or the <SPAN>
tag, but have one final problem to resolve here -
https://discourse.joplinapp.org/t/codemirror-resetting-cursor-in-text-insert-update/15115