Link to does not work when text is in preformatted style

What I did: Selected text and clicked link to then entered a link. Same issue when copy and pasting a link into the preformatted text. If I copy a link from somewhere else in agenda then past it into the preformatted text, it will work. But not if I copy and paste it from somewhere outside the app or try to make the preformatted text into a link.

What happened: The text flashed blue then turned into plain un-clickable text.

What I expected: The text colour to change to blue and to be able to click the link and be directed.

Things that might be helpful to know (Agenda version, OS and model, etc):
MacBook Pro
macOS Catalina 10.15.2
Agenda 9.1.2

Preformatted text allows no formatting, including linking. There is a bug in there which will create a link when pasting a link — as you found — but that really is a bug. It is not supposed to work.

I see. Well, I sincerely hope you never get around to fixing that bug. Thanks anyways!

1 Like

In what way are you using the preformatted style? If is often used for raw text, like source code, and for that purpose, links are bad news.

Perhaps you have a different use case where it makes sense. Can you explain?

I agree for source code, links do not make sense to include there. But I use monospaced text for a variety of difference cases other than code. Usually when the text needs to be very clearly read or easily scannable. It’s is especially helpful when working with numbers and laying out tabulated data. In the case of working with numbers, if I’m writing a list of finances, it’s convenient to be able to link the items to explanations on the costs while still being able to clearly read everything.

If we were able to use different fonts in Agenda (which I haven’t had a need for until now), I think it would be fine to remove links from the preformatted text style, if code is the designated use case. But since it’s the only option for working with monospaced text, I think it’s worth considering the possible use cases other than source code.

I guess if we have a formal source code paragraph type, that would help distinguish. It is something we would like to add in future. Will keep your suggestion in mind for links. (Tables would also help here.)

Formal source code… with syntax highlighting! Would be an fantastic addition. And yes, I think tables would actually be the perfect solution in my case.