Web links in generated images, e.g using image maps?

+1 vote
asked Dec 6, 2012 in Wanted features by anonymous
Is it (or can it be in anear future) possible to include hyper text links in actor names, class names, signals etc and generate a corresponding image map with the graphics so as to enable creation of a fully linked, web based documentation? This would greatly improve the possibility to navigate a web published docuemntation using PlantUML generated graphics.

1 Answer

+4 votes
answered Dec 6, 2012 by plantuml (293,520 points)

This is not documented yet, but this is already possible.

We will write some pages about this, but you can use the following working example to get the syntax:

participant Bob [[http://www.yahoo.com]]
Bob -> Alice : [[http://www.google.com]] hello

class Dummy [[http://www.yahoo.com]]
Object <|-- Foo
class Foo {
  + methods1() [[http://www.yahoo.com/A1{Some explainations about this method}]]
  + methods2() [[http://www.yahoo.com/A2]]
class Foo2 {
  + methods1() [[http://www.yahoo.com/B1]]
  + methods2() [[http://www.yahoo.com/B2]]
class Object {

note left of Foo {
This is a note

note right of Foo {
Yet another link to [[http://www.google.com]] as demo.
You can also <u>[[http://www.yahoo.fr specify a text]]</u> for the link.
And even <u>[[http://www.yahoo.fr{This is a tooltip} add a tooltip]]</u> to the link.


Dummy -> Alice : foo1
ref over Alice, Dummy : [[http://www.google.com]] Foo2

Alice -> Bob : hello

ref over Alice, Bob
  this is a
  reference over
  Alice and Bob



commented May 2, 2017 by plantuml (293,520 points)
The <img> HTML tag can only display image, and does not manage links.
Unfortunately, there is nothing we can do about that.
A possible way would be to switch to SVG, but I don't think the JQuery integration can handle this (yet).
commented May 2, 2017 by nikhil (520 points)
I got it working.. may b a work around for JQuery and SVG.. see this question's answer http://plantuml.sourceforge.net/qa/?qa=1198/generating-svg-using-the-jquery-library

Thanks to PlantUML :)
commented Jul 2, 2017 by ksmiller99 (100 points)
The examples above a great and very helpful - Thanks!
But the tooltips inside the curly braces are not working for me:
PlantUML version 1.2017.14
W7 Pro 64

Any suggestions?
commented Sep 19, 2017 by nikhil (520 points)
There is issue with tooltips on IE 11, you can try it out on Chrome or other browsers.
Check http://plantuml.sourceforge.net/qa/?qa=6442/tooltips-not-working-on-ie
commented Sep 14 by Thierry (100 points)

Thank you for the help.
I try with this and it works perfectly: