New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register custom browser protocols for .pdez and .pdex files #559
Comments
|
On a side note, we may need to warn people to only run code when they trust the author (similar to VSCode's restricted mode) |
|
That should be in place because the file extension mapping should be happening. Is that not working? For the second point, can you open a separate issue? Or perhaps even before that, have you tried it to see what it says now? I realize it's not making a stink about the security implications, but it should already be prompting whether you meant to open it or not. |
|
It works as intended if you download the file then open it. I was talking about opening the file directly by clicking a link in the form |
|
I did some more research. On macOS at least, the first step is adding the protocol name and scheme to the <key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Processing 4</string>
<key>CFBundleURLSchemes</key>
<array>
<string>processing4</string>
</array>
</dict>
</array>Then there needs to be a handler for these URLs in the PDE code using References: |
|
You can just use http:// or https:// URLs, no need to do a special protocol handler. |
|
I made a quick test to show the current behavior: https://sableraf.github.io/testURIscheme/
Note: I also included a placeholder link with a |
|
Implemented for macOS and Windows for 4.2; uses |

Since Processing 4.0, you can bundle sketches as double-clickable
.pdezfiles and Libraries/Modes/Tools as.pdexfiles for easy sharing and installation. (see Processing #73, Processing #3987, and the release notes for 4.0 beta1)A great next step would be to allow
.pdezand.pdexfiles to be opened in the PDE directly from a url in a web browser. This would enable easier sharing of sketches on the forum, better UX for multi-tab examples on the website, and open the possibility for online Processing sketch galleries.This would require the user to register the protocol on their system (which I imagine could be done from the PDE ?) For example, this page describes the steps needed to register a custom browser protocol on Window, macOS and Linux. There is also a W3C documentation page about custom scheme and content handlers.
The text was updated successfully, but these errors were encountered: