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.