Editor: File Upload. How to show the uploaded file's name with hyperlink to the file in the table?

Editor: File Upload. How to show the uploaded file's name with hyperlink to the file in the table?

safaviasafavia Posts: 36Questions: 14Answers: 0

Hello friends,
In Editor's File Upload example, the image is shown in the table (snap shot below). Instead of showing the uploaded image, I would like to show the uploaded file's name with hyperlink to the file. How can I do that?


.
.

I believe the following code needs to be modified:

Please advise what I should replace the code with.

Thanks so much!
Alan

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Hi @safavia ,

    I think your code is based on this example here. What you can do instead, instead of using the img tag, you can create a link with something like:

    '<a href="' + editor.file( 'files', file_id ).web_path + '">link to image file</a>'
    

    Cheers,

    Colin

  • safaviasafavia Posts: 36Questions: 14Answers: 0

    Thanks so much, Colin!

    Cheers,
    Alan

This discussion has been closed.