[pmwiki-devel] Customise uploaded files markup for SVG

Jan Bernitt jan.bernitt at gmx.de
Sat Jun 27 12:22:59 CDT 2009


> If you want PmWiki to include an SVG file with the <img src="pic.svg"/> HTML 
> tag, place this in config.php :
I dont't ...
> 
>   $ImgExtPattern="\\.(?:gif|jpg|jpeg|png|svg|GIF|JPG|JPEG|PNG|SVG)";
> 
> As of today, however, only Opera and Safari seem to support such embedding.
.. because of that meagre support - I will if FF3 supports it
> 
> To allow uploading of .svg files, add also to config.php :
>   $UploadExts['svg'] = "image/svg+xml";
I did that
> If you have to use an <iframe> of an <object>, this recipe could be helpful:
>   http://www.pmwiki.org/wiki/Cookbook/LinkedResourceExtras
Yes- My current solution uses the <object> tag. I had a look at the
recipe - I think it is a good interim solution but in fact I really
would like to have a customised attachment  markup for SVGs as a core
function like there is a special behaviour for images rendered as <img>
instead if a link <a> tag.

I found another workaround uses the <img> tag  in combination with a
java-script that will change em to a <object> in case it is not
displayed. (see http://trash-wissen.de/2007-09-26/svg-grafiken-im-element/ )
I think that's a second solution will work together with the changes you
mentioned first.




More information about the pmwiki-devel mailing list