So I finally found parameter metatag descriptions on the templates page (Do I really need to know templates first? Normally not. Here: yes!)
The description is not great, but somehow you find out that you need to CONCATENATE param and the parameter name...
Found out that I don t need to build a plugin. In the beginning the distinction between plugin and macro is hard to find.
OK, here is a first version that works with 4.x, because there are metadata for parameters (with meaningful names) now.
AFAI saw scaling (SVG s actual strength) doesn t work (yet). Height and width crop. Needa check this out.
Most browsers support SVG natively now, so SVGs showed on Firefox 16, IE 9 and Chrome 23.
## @param SVGattachmentName:type=string|required=true
I believe the only way to embed Scalable Vector Graphics in Confluence is to use a User Macro as this fucntionality isn't available in the default Confluence install. There is a User Macro listed in this document, although I suspect you would need to update it to make it compatible with newer versions of Confluence: https://confluence.atlassian.com/display/DISC/SVG+Image+User+Macro
You might find the following document useful if you are intending to upgrade user macros to from 3.x to 4.x compatibility: https://developer.atlassian.com/display/CONFDEV/Upgrading+and+Migrating+an+Existing+Confluence+Macro+to+4.0
However, can I suggest that if you do upgrade the SVG macro that you then make it available to the community to save the next person who needs it from also having to go through the process of upgrading the macro again.
All the best,
've just achieved this by saving the visio diagram as a web page based upon svg (publish - advanced). That creates a <filename>_svg_1.svg file which I attach to confluence and then embed into the same confluence page using the iframe macro. Job done.
You also need to tick the Details (shape data) tick box to get the hyperlinked imagemap functionality created in visio.
You can patch Confluence to show an SVG by
image/svg+xml svg svgzto the file
in Confluence Editor
Unfortunately, to use the two smallest image size reduction buttons or setting a smaller size then 300px does not work with Confluence richtext editor because Confluence tries to create a thumnail on server side which is currently not supported for SVGs (and the Confluence server will return a empty, broken image).
The workaround is to use the free Confluence Source Editor, use button "<>" and set the size of teh SVG to whatever you want (which should be perfectly ok for vector graphics).
The image is displayed in confluence (with !image.svg) , but zoom and panning don't work (panning means move the image in the canvas with the cursor). I am using Chrome, installed an extension that allows zooming and panning, other svg works correctly but the one in confluence not.
If I drag and drop image.svg from the disk on Chrome then zooming and panning works OK.
If I add the image as an attachemnt and click the link , it downloads the the svg.
What do you mean with the zoom functionality of your browser? CTRL+/- ? This resizes the whole page.
OK, now I got what you mean but I have unfortunately no solution for it!
You can use Chrome developer tools to compare the html produced by Confluence (not working) and a working SVG by clicking right mouse button on the image and use "inspect".
I meant CTRL+/- to resize the whole page which is not what you want ...
Thanks. I found the problem:
Confluence set the attribute Content-Disposition:attachment to the HTTP response for the request for the svg file. It should be Content-Disposition:inline or simply not have that attribute.
Any idea how to fix this?
I know that this discussion is quite old however I ran into a similar problem recently. I was able to see SVGs in Confluence pages but none of the links in the SVG worked.
Therefore I wrote a small plugin which closes that gap. In case your are interested: https://marketplace.atlassian.com/plugins/de.edrup.confluence.plugins.svg-out
Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time! We're looking for people to participate in a remote 1-hr workshop...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs