Skip to content
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

[Feature Request] Allow linking to Finder (or folders) #406

Open
Overload119 opened this issue Jul 5, 2023 · 3 comments
Open

[Feature Request] Allow linking to Finder (or folders) #406

Overload119 opened this issue Jul 5, 2023 · 3 comments

Comments

@Overload119
Copy link

In a note I want to Cmd+Click a link to open a Finder window to that folder.

It seems to work in this case:

[View in Finder >](/Users/amirsharif/Dropbox/Documentation/Homes/My%20Folder/)

But not in this one:

[View in Finder >](/Users/amirsharif/Dropbox/Documentation/Homes/My Folder/)

It seems the encoding is only relevant to the spaces so there's no automatic way to do this.

@astoilkov
Copy link
Member

Do I understand that you want the link to work without the need to write %20 instead of space in the link?

The markdown syntax specification writes that URLs should be encoded. See the example here.

@Overload119
Copy link
Author

I don't think it's natural to know that %20 is a space, so it's not easy to link to a directory.

If you drag and drop a folder, it tries to load it into Nota.

If you try to use a paste hook or have a command, most tools will encode the whole thing:

encodeURIComponent('(/Users/amirsharif/Dropbox/Documentation/Homes/My Folder/)')
// => '(%2FUsers%2Famirsharif%2FDropbox%2FDocumentation%2FHomes%2FMy%20Folder%2F)'

Maybe the solution is to support when the full link is encoded (which doesn't work today it seems).

[test](Users%2Famirsharif%2FDropbox%2FDocumentation%2FHomes%2FMy%20Folder)

Is not clickable.

@astoilkov
Copy link
Member

Have you tried encodeURI? This will produce /Users/amirsharif/Dropbox/Documentation/Homes/My%20Folder/ and it might work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants