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

Add support for marking up links to local files #44

Closed
apankrat opened this issue Aug 4, 2021 · 1 comment
Closed

Add support for marking up links to local files #44

apankrat opened this issue Aug 4, 2021 · 1 comment

Comments

@apankrat
Copy link
Owner

apankrat commented Aug 4, 2021

Add an option to have local paths, e.g. C:\Windows, to be marked up as file:/// links and handled the same way as http:// and https:// links are handled right now (pulse on hover, highlighted and clickable when the CapsLock is on).

@apankrat
Copy link
Owner Author

apankrat commented Aug 4, 2021

Done in 20210804.

Text enclosed in a pair of backticks (`) will be marked up as a file:/// link, with all forward slashes (\) converted to the backslashes (/).

For example

`c:\windows\foo bar.txt`

will appear as is and will link to

file:///c:/windows/foo bar.txt

The option is off by default and it is not accessible via the UI, not yet. To enable it, open browser console (usually accessible via F12), type the following command, hit Enter and then reload the page:

NB.poke('fileLinks', true)

To disable the option use

NB.poke('fileLinks', false)

@apankrat apankrat closed this as completed Aug 4, 2021
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

1 participant