Support » Plugin: DrawIt (draw.io) » How to add hyperlink on the diagram?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Agree. Added some links, but they are not showing up. Would like them to link to anchors on the page.

    maxident

    (@maxident)

    I have the same problem using wordpress, visual composer and draw.io.

    kasga

    (@kasga)

    I know it’s a bit late, but I had the same problem, so I wrote a minor fix, that replaces the img with the svg … hope this helps;)
    It’s important, that when you create your diagram, it has to be exportet as an svg.

    jQuery(document).ready(function($) {
        $('img[title="drawit diagram"]').each(function(index){
    		var diagram = $(this);
    
    		var diagramImg = diagram.attr('title', 'drawit diagram');
    		var diagramImgSrc = diagramImg.context.src;
    				
    		var diagramClasses = diagramImg.context.className;
    		var diagramWidth = diagramImg.context.clientWidth;
    		
    		var container = $('<div class="drawio-diagram ' + diagramClasses + '" style="width:' + diagramWidth + 'px"></div>');
    		container.insertAfter(diagram);
    		
    		container.load(diagramImgSrc);
    		diagram.remove();
    	});
    });
    Plugin Author assortedchips

    (@assortedchips)

    I have added some basic support for SVG images with links in them. I have not released it as an official version yet, but you can download the dev version to test it out by downloading and installing the “Development version” of the plugin from https://wordpress.org/plugins/drawit/developers/

    Allowing links in SVGs has security implications if you end up getting SVGs from untrusted sources. To enable having links in SVGs, go to the DrawIt settings page in your WordPress installation and enable the “Use insecure version for SVG images” option.

    Please let me know if you find any bugs or run into any problems so I can fix them before releasing to everyone.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add hyperlink on the diagram?’ is closed to new replies.