Notepads icon indicating copy to clipboard operation
Notepads copied to clipboard

Interactable links/URLs

Open CapoFantasma97 opened this issue 5 years ago • 10 comments

Please make so that, even as an optional settings maybe, the program would recognize http(s) URLs as such, and make them be clicked like an hyperlink, so that they'd be opened on the default browser of the machine.

Currently, URLs are considered as simple plain text and are therefore non-interactable.

Selecting the text of the URL, right-clicking and pressing "search in web" provides a similar result as it opens the URL directly on the browser, but with a lot of unnecessary steps.

CapoFantasma97 avatar Oct 09 '20 21:10 CapoFantasma97

Issue-Label Bot is automatically applying the label enhancement to this issue, with a confidence of 0.88. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Oct 09 '20 21:10 issue-label-bot[bot]

This is interesting. Notepads is about plain text, hence why the hyperlinks aren't displayed as in other apps like Word, for example. On the other hand, the app uses a customized RichEditBox control, so in theory it should be doable to add support for rich text such as hyperlinks.

XamDR avatar Oct 15 '20 23:10 XamDR

I remember RichEdit has such a feature built-in but never got time to test it and make it work. @XamDR Feel free to try it yourself.

0x7c13 avatar Jan 04 '21 05:01 0x7c13

I remember RichEdit has such a feature built-in but never got time to test it and make it work. @XamDR Feel free to try it yourself.

Thank you. I will try to implement such feature.

XamDR avatar Jan 04 '21 18:01 XamDR

I finally was able to work on this feature and so far Notepads can display hyperlinks, save hyperlinks in .rtf files and also open .rtf files with hyperlinks. I have some screenshots:

  • Pasting a hyperlink: image

  • Saving the file with .rtf extension: image

  • File saved successfully: image

  • Opening file using the context menu (since there isn't yet an association to a .rtf extension, I tried that way): image

  • File opened successfully (there is an extra line at the end, but I think that's a solvable issue): image

So far the biggest change to the app has been to make it accept the .rtf extension for both saving and opening files. That's the only way I found to display hyperlinks once the user saves the file and then wants to open it later. With plain text, it will display raw rtf, which is not very readable.

By the way, the shortcut Ctrl + clic works to open the hyperlinks, with the only issue that the cursor doesn't change from I-Beam to hand. I suspect that it's an internal rendering issue of the RichEditBox control.

XamDR avatar Jan 18 '21 21:01 XamDR

Cool progess so far! But would that mean the only way to interact with links will be to save files in .rtf?

It would be nice if it were filetype independent. Like Notepad++, Atom, VS Code, etc.

All of those recognize URLs even in .txt files and have a double click or a Ctrl+Click to open links (but are also focused on programming and often have a spartan design, instead of being plain text focused and clean looking like a Fluent UI).

CapoFantasma97 avatar Jan 20 '21 14:01 CapoFantasma97

Cool progess so far! But would that mean the only way to interact with links will be to save files in .rtf?

It would be nice if it were filetype independent. Like Notepad++, Atom, VS Code, etc.

All of those recognize URLs even in .txt files and have a double click or a Ctrl+Click to open links (but are also focused on programming and often have a spartan design, instead of being plain text focused and clean looking like a Fluent UI).

First, thanks for your feedback. About the interaction with hyperlinks, yes that's something that I have in mind. I think it's something feasible, but it will definitely take more time to implement it.

XamDR avatar Jan 23 '21 16:01 XamDR

@XamDR @JasonStein I wonder if this is still in the todo list?

CapoFantasma97 avatar Dec 04 '21 10:12 CapoFantasma97

Any updates?

CapoFantasma97 avatar Jan 02 '23 14:01 CapoFantasma97

Bumping the thread, as I would love to see this implemented as well. This has fast become my Notepad++ replacement, and this is the only 'feature' that I sorely miss.

mccabedd avatar Jul 05 '23 14:07 mccabedd