I'm trying to add a custom button in the sidebar of one of my entries.
I've found that it could be done in Craft 3 with this template hook: cp.entries.edit.details (e.g. How to add a custom button at the right section of an entry?)
In the Craft 4 upgrade documentation, it mentions that this hook has been removed. I found these two events - EVENT_DEFINE_EDITOR_CONTENT and EVENT_DEFINE_ADDITIONAL_BUTTONS - but so far, I haven't been able to return html to my template.
Is there an easy way to do it in Craft 4?