Hover-link with custom html rather than a source path

I would like to use the hover popup to display some custom HTML rather than provide a path to a file.

Is it possible to display HTML generated in code? or does hover popup require a physical file in the vault?