Editor: add a file link from uploaded files

Sorry for my second editor-question besides this one: Multiple instances of editor plugin on page

We’ve an editor field where we‘d like to implement links to uploaded files within a text paragraph. Like a regular link but to an uploaded file.

In the editor edit pop-up (when highlighting text) you can “only” add regular links via the dialog modal window.

“For further information please read our disclaimer PDF”.
(The bold part should be the link to the file.)

Is this possible? The least user friendly version would actually be that the user has to find out the link to the file and then paste it in the modal window.

Thanks! I’d also like to say, that you’re customer support is quite awesome!

Hm, I think not really without adding the link manually, but would have to look into this myself. I think there is an issue somewhere, at least I think I’ve read something.

Hm, bummer.
How hard would it be – for a novice – to implement a second field in the url modal window with a file list?

Or maybe option 2: I guess I could prepopulate a text field beneath the file field with the file url using a file upload/update hook? To make it easier for the user to find out the actual file url and copy-paste it from there.
(Since it would be a file field with max: 1)

You could show the URL in a file section info?

Yeah, thought about that, but then it’s not copy-pasteable. (You mean the little gray text next to the filename, no?)

If you right-click on the text, you can copy the link…

Don’t know if it is possible to hook into the modal window at all or how, in any case you would have to be familiar with Vue.js

That’s true, but it’s the panel link then – the URL will contain /panel/pages/.

Ok, thanks!

What I meant was this:

    info: "{{file.url}}"

This gives you the URL of the media folder. Then right-click this URL and copy/paste it.

Ah cool, thanks!

I think this solution does not work anymore. Or at least on Windows and latest Kirby version. What I get after copying the file URL is in fact the URL with /panel/. Which makes sense I guess, because the whole row in file section in an anchor tag pointing to the panel page with file details.