You probably know that you can style your JointJS elements in many different ways by providing your own SVG markup. But did you know that you can use the same custom markup not only to define elements but also ports or link labels? Have a look at this example.
Note that the same markups that are used to define elements are also used for ports and link labels.
The source code of this demo is available as part of the JointJS+ commercial license. Don't have a license yet? Start a trial and use the source code of this and many other demos for free, with no obligations, for 30 days.