Please consider sharing the widgets you created on this site for others to use.

 Actions

SVG

From MediaWiki Widgets

SVG widget
Description:Allows you to embed a Scalable Vector Graphics (SVG) image (img tag using inline markup encoded for data url scheme) on a page.
Author:DSquirrelGM
Code:Widget:SVG
Status:active
Security:unknown
Inv-Icon tools.svg.png

To copy this widget to your wiki, cut and paste the entire source of the SVG widget code page into a page called Widget:SVG on your wiki.

If you don't have the Widget extension set up on your wiki, go to its description page on MediaWiki.org and follow the installation instructions.


This widget allows you to embed a Scalable Vector Graphics image (img tag using inline markup encoded for data url scheme) on your wiki page.

To insert this widget, use the following code:

{{#widget:SVG
 |id=
 |class=
 |style=
 |width=
 |height=
 |x=
 |y=
 |preserveAspectRatio=
 |viewBox=
 |url=
 |content=
}}

Parameters

Refer to the SVG specification for the use of these attributes: id, class, style, width, height, viewBox, preserveAspectRatio, x, y, version
id standard unique identifier attribute (defaults to an alphanumeric value based on length of content)
class standard class attribute
style standard style attribute
width horizontal image size 100%
height vertical image size 100%
version specification version 1.1
x horizontal origin (ignored on top level element) 0
y vertical origin (ignored on top level element) 0
preserveAspectRatio Aspect ratio adjustment xMidYMid meet
viewBox viewport extents 0 0 100% 100%
content SVG markup to be embedded
url Flag: (set a non-empty value to use url() scheme instead of img tag)

Sample results

Example 1

Example 2
1 2 3
4 5 6

Comments

blog comments powered by Disqus