Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

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

+1 vote
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.
asked Dec 6, 2012 in Wanted features by anonymous

1 Answer

+2 votes

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:

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


@startuml
class Dummy [[http://www.yahoo.com]]
Object <|-- Foo
class Foo {
  [[http://www.google.com]]
  + 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 {
  [[http://www.yahoo.com]]
}
@enduml



@startuml
:Foo:
note left of Foo {
[[http://www.google.com]]
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.
}

@enduml



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

Alice -> Bob : hello

ref over Alice, Bob
  [[http://www.google.com]]
  this is a
  reference over
  Alice and Bob
end

@enduml



 

answered Dec 6, 2012 by plantuml (122,830 points)
PlantUML server takes for ever to process [[ long string ]]
I am using Jquery Integration. However when i am adding link/url then its not working. Below is my example.html file content. Everything is loaded but link is not getting displayed -

<html><head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery_plantuml.js"></script>
<!-- rawdeflate.js is implicity used by jquery_plantuml.js -->
</head><body>

<img uml="
() Actuator3 AS act [[http://google.com]]
[Module8] --> act
">

</body></html>

What I am missing here?
I am using the PlantUML server deployed on my localhost.

Rest all is working as expected but not the link.
please help.

~Nikhil
The <img> HTML tag can only display image, and does not manage links.
Unfortunately, there is nothing we can do about that.
Sorry!
A possible way would be to switch to SVG, but I don't think the JQuery integration can handle this (yet).
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 :)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...