Hide Highlightr code

Hi! I use Obsidian for writing and colored highlights are really useful for me. But I kinda hate that highlighting a word creates a huge piece of code.
i.e. <mark. style=“background: #FCFF3740;”>text</mark.>
(without dots)
I know that css snippet can hide tags and then text looks like this:
style=“background: #FCFF3740;”>text

but I’d like the whole code to be hidden. I know that cursor will still act like there’s code, but thats ok for me.

Is there a way to hide whole <mark. style=“background: #FCFF3740;”> section via snippet?
So I can right-click on text, choose “highlight” (via Highlightr) and the color would change, but the code would auto-hide. I’m also okay if this would work only for specific colors.

For the tags to dissapear I use this code:
.cm-tag {
display: none !important;
}

Thank you!

1 Like

I have the same problem, did you find a solution for it ?

We cannot use CSS to hide because the equal sign in <mark style="..."> has no class encapsulate it.