nbelyh / svgpublish-releases

Releases repository for the Svg Publish Visio add-in
http://unmanagedvisio.com/products/svg-publish/
7 stars 2 forks source link

Feature to automatically pick up URLs in properties #45

Closed nbelyh closed 3 years ago

nbelyh commented 3 years ago

The text in the built-in properties panel to be auto-converted to a hyperlink (in case the value contains or is a hyperlink) This is not currently out of the box, but there is a workaround to be used (known feature request). The steps then to add it to your diagram, this should auto-convert all "link-like" properties to "real" links:

This issue is to make this as a checkbox.

$(document).ready(function() {
    diagram.selectionChanged.add(function() {
        $("#shape-props table tr td + td:contains('https://'), #shape-props table tr td + td:contains('http://')").each(function(_, el) {
            var href = $(el).text();
            $(el).html("<a target='_blank' href='" + href + "'>" + href + "</href>");
        })
    });
})

image

nbelyh commented 3 years ago

Now the links should be auto-converted, even in properties. Fixed by https://github.com/nbelyh/svgpublish/commit/5e829fc0f3040cf9d0a8dc1a037baae51fb96a4b