I am not aware of a straightforward way to do what you want. But in an HTML element and with a plugin, you can do the things you said.
For this one, you need to use Toolbox plugin.
Simply, you should create a js2bubble element which will trigger an event when called. This is creating a javascript function you can call in an HTML element.

Then, whenever it is triggered, you can do whatever you want. I am calling a custom workflow I have created for example.

And this is how you call this newly created javascript function in an HTML element:
See the demo:

This opens a bubble page in the same window. I have a page called lion.

See the demo:

You can find both of these examples in this editor if this is what you need: Test for Forum 12 | Bubble Editor
