Custom buttons/actions for elements

Hi, i want to know if it’s possible to add custom buttons(or anchors) to an element and/or a transition.

My first idea was something like the text input that its shown when user double clicks an element, or a new type of element that displays a button that can be managed with onClick functions

Have you checked out this example: