Confluence data center 9.0 and above, how do you use the highlights actions panel that inline Comments uses

I found the tutorial from confluence 5.4 but those methods do not seem available in 9.0.1. I would like to do something like inline comments, where a user highlights the content and I can wrap it in a custom tag and also add something to the body.storage.value.
It seems you can hack the DOM but that doesn’t seem the best way.