Was this page helpful?

SVG

    Vendor MindTouch
    Type Native
    Categories Images
    Requires MindTouch 8.05 or later
    OS Restriction None
    Status Stable
    License Free/Open Source
    SID (service id) sid://mindtouch.com/2008/05/svg
    Assembly mindtouch.deki.services

    Install Extension

    URL of your MindTouch install (ex: http://www.mindtouch.com)
        

     

    Description

    This extension embeds SVG images.

    See also How to add an extension, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.


    Svg(source : str, width : num, height : num, embedding : str) : xml

    This extension embeds SVG images.

    Parameters

    Name
    Type
    Description
    source uri SVG source code or source URI
    width num (optional): image width (default: 100%)
    height num (optional): image height (default: 250)
    embedding str (optional): embedding style (one of "embed", "iframe"; default: "iframe")

     

    Was this page helpful?
    Tag page
    Viewing 3 of 3 comments: view all
    According to: http://en.wikipedia.org/wiki/Scalable_Vector_Graphics
    Different browsers needs different embedding. My proposal is if it is possible, to check the type of web browser and to render SVG appropriately (for Opera, Safari and Chrome as <img> and for other as <object>).

    Now when the page is opened in Google Chrome for example it is asking me to save the .svg file and not opening it as normal image. The best will be if SVG image is added not by extension, but as regular image similar to adding JPEG files to Deki pages. edited 10:08, 26 Jul 2010
    Posted 10:07, 26 Jul 2010
    "it is asking me to save the .svg file and not opening it as normal image."

    The problem resides in the mindtouch software. The server responds in the HTTP Header with "Content-Disposition: attachment;". I'm looking for a solution to this. Normally, adding to the property: files/whitelisted-disposition-mimetypes, the value image/svg+xml should solve this. But it doesn't ...
    Posted 06:47, 16 Feb 2011
    @okennobi The problem is that SVG, like HTML, can contain executable content. That's why the content disposition is set to 'attachment'. Otherwise, it would provide a way to upload and execute foreign code on your site. Also, check that this mimetype is not in your blacklist (files/blacklisted-disposition-mimetypes). Lastly, make sure you have UNSAFECONTENT permission when you attach the file.
    Posted 07:53, 16 Feb 2011
    Viewing 3 of 3 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by