Links in SVG embedded in other HTML will open embedded inline - lack of 'target=_top'

0 votes
asked May 4, 2015 in Bug by peter.loborg (360 points)
To present the SVG result in a HTML page the SVG will be embedded. Selecting a link in the SVG will
effectively use target=_self (the default) and hence replace only the SVG diagram with the referenced page.

The wanted behaviour is to generate the link in SVG with a target attribute set to something specified in the
diagram or by the plug-in and submitted as a run time parameter to PlantUML. Always including target=_top
will also do the trick and could be a good enough behaviour.

1 Answer

0 votes
answered May 5, 2015 by plantuml (295,000 points)
selected May 6, 2015 by peter.loborg
 
Best answer

Ok.

In the last beta: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

We did the following modifications:

  • By default, we add target="_top" in the SVG generated link (should be the better default dehaviour)
  • We add an optional skinparam svgLinkTarget if you want to set up a specific target. Example:

@startuml
skinparam svgLinkTarget foo
start
:foo1 [[http://www.google.com]] end;
stop
@enduml

Is this what you are expecting ?

Few tests have been done. So if this sounds ok for you, this will be included in next release.

Thanks for the suggestion!

 

commented May 6, 2015 by peter.loborg (360 points)
Default target works excelent - Thanks!
...