SVG

With this element you can insert a SVG. You can use XML data directly or reference a file. A flash fallback will be used for browsers which do not have native SVG support, so that it also works in e.g. IE 6/7/8.

Property

width

Data type

integer /stdWrap

Description

Width of the SVG.

Default

600

Property

height

Data type

integer /stdWrap

Description

Height of the SVG.

Default

400

Property

src

Data type

file resource /stdWrap

Description

SVG file resource, can also be referenced via EXT: prefix to point to files of extensions.

Example:

src = fileadmin/svg/tiger.svg

Property

value

Data type

XML /stdWrap

Description

Raw XML data for the SVG.

Will be ignored, if "src" is defined. Requires renderMode to be set to inline.

Deprecated
Usage without renderMode set to inline is deprecated since TYPO3 9, and will stop working in TYPO3 10.

Property

noscript

Data type

string /stdWrap

Description

Output, if SVG output is not possible.

Deprecated
noscript is deprecated since TYPO3 9 and will be removed in TYPO3 10.

Property

renderMode

Data type

string /stdWrap

Description

Setting renderMode to inline will render an inline version of the SVG.

Property

stdWrap

Data type

->stdWrap

[tsref:(cObject).SVG]

Example:

10 = SVG
10 {
  width = 600
  height = 600
  value (
    <rect x="100" y="100" width="500" height="200" fill="white" stroke="black"/>
    <line x1="0" y1="200" x2="700" y2="200" stroke="red" stroke-width="20px"/>
    <polygon points="185 0 125 25 185 100" transform="rotate(135 125 25)" />
    <circle cx="190" cy="150" r="40" stroke="black" stroke-width="2" fill="yellow"/>
  )
  noscript.cObject = TEXT
  noscript.cObject.value = No SVG rendering possible, please use a browser.
}

This example will show some geometric forms.