Adding dynamic styles to marks

I have a comment plugin using marks. I want to highlight the selected mark (i.e style is with either a classname of data attribute) if the user’s cursor is on the the mark. How would I go about doing this? I noticed that decorations cannot be placed on marks?

@codewitch Decoration should wrap the content that the mark contains, there is no mark decoration.