Add support for hyperlink around buttons

Currently hyperlinks do not work when placed around button elements in the plugin UI.

Example code:

<a href="http://example.com">
    <button>Example</button>
</a>

Use Case:
For example, to open local documentation in the browser, you can place a hyperlink around a help icon that links to, file://plugin_directory/help/index.html or open help documentation online, http://example.com/

great idea! I want this feature too.
+1

Unfortunately, the file URL will not be allowed going forward (starting XD 24)

I can see why, but that’s a real loss.

It should be a commonplace that a plugin creates a local HTML file (e.g., for a report or for a cheat-sheet) and then opens it.

2 Likes

Bummed about this. Why was this decision made?

PS I’ve updated the post details.

Is there a chance that this gets changed when permissions arrive? While I am absolutely in favor of not allowing something to get opened externally without a permission system (I think I’ve made that clear in many previous posts around the topic :wink::laughing:), using the file protocol in a system with permissions seems practically obligatory (especially when a plugin exports something, this is the most useful way to allow users to open it or a containing folder, as long as the user “agrees” to do that).

1 Like

Yes! Didn’t mention permissions API since I don’t have much visibility yet. But there is a good chance permissions API solves this problem

2 Likes

The permissions API will definitely address this use case, and do so in a way that actually works across platforms. Right now this behavior only worked on macOS, which meant plugins using this were broken on Windows 10 since moment one.

1 Like

Good to know there’s a solution on the way. This is truly important.

1 Like