Extending SVG to Include Tooltips and Anchor Tags? #169
Replies: 2 comments 1 reply
-
Thank you 😊 Good news: Interactive SVG is possible! There is not direct support for anchor It is not possible to add meta data to nodes right now, so you would have to store a list of urls connected to node names in some other place. From the Readme
|
Beta Was this translation helpful? Give feedback.
-
If this should work out of the box, this should be great!!! |
Beta Was this translation helpful? Give feedback.
-
I've been enjoying using nomnoml.com. Thanks for creating it!
At best I hack a little at JavaScript, so I'm not up for implementing the enhancements raised here within nomnoml TypeScript myself, but I have created a process around the nomnoml file to embed additional information in the SVG format to support tooltips (via <title>) and anchor tags. I'm wondering if you've ever considered extending the nomnoml syntax for this? I do have concerns that it would clutter up the syntax too much, but thought I would raise it for discussion.
I think you should be able to access a simple SVG sample at this link: https://svgsample.cds3.repl.co/extended.svg
As far as syntax, it may only be squiggly brackets that are available at this point. Something like:
[nodename {This is a tooltip...}]
But then what do you do for an anchor tag? Using { } to embed html seems too ugly:
[nodename {<title>This is a tooltip...</title>}]
Any interest or thoughts on how to enable the use of these extended SVG capabilities within nomnoml?
Thanks for the tip on using npx nomnoml. That has been a big help with generating an SVG from a revised nomnoml script.
Beta Was this translation helpful? Give feedback.
All reactions