All threads / Display non-image attachments with Trix/action_text

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Display non-image attachments with Trix/action_text

Nelson Casanova asked in Rails

I've got the barebones functionality of Trix working ok... The editor displays ok and text and images display as expected. But when I drag and drop a PDF (for example) I can see in the editor a small box with the file title and size display, once its saved the only thing its displayed is, again, the file title and size with no link to a download or anything... the generated html looks promising as it includes some sort of json value inside a 'figure' tag but no idea how to display that...

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,629+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.