svg as a spescial case for image

Milian Wolff mail at milianw.de
Mon May 28 11:26:29 EDT 2007


Am Montag, 28. Mai 2007 schrieb Aslak Raanes:

> SVG starts to become more useful in browsers like Firefox, OmniWeb,

> Opera and soon Safari. There is a couple problem. Since no browser

> support svg embedded with img one need to fall back to html from:

>

> <object data="/path/to/img.svg" type="image/svg+xml"

> width="512" height="384">Alt text</object>

>

> Second, one need to write the width and height for most cases of svg to

> make them scale correctly. (This, I think can be considered to be a bug

> in some of the current browser implementations)

>

> Making object as a specielt case for svg-images would be nice, but one

> probably need some way to set the size of the image to make it practical.


I'm not sure if this should be added to Markdown core since not many people
use svg yet (the browser support is not matured imo - which is a pity).

When you use Michel Fortins PHP Markdown you can simply extend the core class
and overload the required function, shouldn't be that hard to do.


> I didn't find if this has been discussed in the archive before, but how

> about adding size in the syntax. I.e. in addition to:

>

> ![Alt text](/path/to/img.svg)

>

> ![Alt text](/path/to/img.svg "Optional title")

>

> One could write:

>

> ![Alt text](/path/to/img.svg "Optional title" 512x384)

>

> and:

>

> [id]: /path/to/img.svg "Optional title attribute" 512x384


Seems straigtforward to me, setting height / width for normal images would be
nice too. So I'd say this syntax should be integrated into Markdown

--
Milian Wolff
http://milianw.de


More information about the Markdown-Discuss mailing list