How do you put a hyperlink in the description of a rectangle

0 votes
asked Jun 8, 2020 in Question / help by John

I'm trying to define objects in this case a rectangle with hyperlinks in the desciption

I've followed the documentation on deployment and https://plantuml.com/link

Here is my sample code

```

@startuml

rectangle rectangle [[http://www.google.com]] [
====
Title: rectangle
....
Reference: [[https://www.google.com]]
]

@enduml

```

Note:  I can put it just at the object but I want multiple links in the description

```

@startuml

rectangle rectangle [[http://www.google.com]] [
====
Title: rectangle
....
Reference: here is where I want to put the links
]

@enduml

```

1 Answer

0 votes
answered Jun 8, 2020 by The-Lu (64,340 points)
edited Jun 8, 2020 by The-Lu

Hello J.,

After reading this Q&A /7911 on this same subject: https://forum.plantuml.net/7911/how-do-you-add-a-link-to-multiline-component.

1/ If there is only one link at the end of the description, you can put directly ']]]' at the end of the description and do:

@startuml
rectangle rectangle [[http://www.google.com]] [
====
Title: rectangle
....
Reference1: [[https://www.google.com]]]
@enduml


 [Click to see on PlantUML online server]

2/ If there are more links, you can use this workarond, adding '\n\' after the link on the description if there are at the end of some lines inside the description:

@startuml
rectangle rectangle [[http://www.google.com]] [
====
Title: rectangle
....
Reference1: [[https://www.google.com]]\n\
Reference2: [[https://www.google.com]]]
@enduml


[Click to see...]


If that can help,
Regards,
Th.

...