Page MenuHomePhabricator

Add local wikilink attribute to SVG elements
Closed, DuplicatePublicFeature

Description

Hi. For now, there is no way to add a link to part of Lua SVG. Only ImageMapEdit, but this is too cumberstome. This can be very helpful, if there would be a simpler way. Something like this:

local svgstring = '<svg ...>...<circle cx="100" cy="300" r="50" wikilink = "Talk:Main Page"/>...</svg>'

The translation should be straightforward, to

<a href="https://en.wikipedia.org/wiki/<wikillink value>"><circle .../></a>

I can understand why htpps links can be dangerous, so I'm talking about wikilinks only. You can decide to allow interwiki links too, of course, if you think it will be OK. But at least local wikilinks are fine for sure. Thank you.

Event Timeline

Current support in Lua is for rendering SVGs in <img> tags, which does not support any interactivity like clickable links. It's only possible with T407783.

(And I don't see why this is made a subtask of T407710 which is totally unrelated.)