no name said over 7 years ago on WYSIWYG Editor with Trix :

Hey, nice screencast!


It was really useful, but I've noticed one thing. There is no CSRF protection for file uploads and deletes. This could be really dangerous and I think that it should be fixed.


Btw. commenting is painful. I had to sign up, confirm my email, etc. I had to take a lot of different steps in order to write this comment. It would be great if you could simplify this process.


Pablo Bello said almost 7 years ago on WYSIWYG Editor with Trix :

To add CSRF:

xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
xhr.setRequestHeader 'X-CSRF-Token', $('meta[name="csrf-token"]').attr('content')


chunkster29 said almost 7 years ago on WYSIWYG Editor with Trix :

Could  it be integrated with the aws-s3 gem


storrence88 said about 4 years ago on WYSIWYG Editor with Trix :
Hi! Thanks for making this tutorial. I am using Trix on a form that submits a POST request to a Word Press endpoint that creates a draft of a post (user submitted content). However, when I upload an image using Trix, in the WP dashboard, I get a broken link and no image. I think this is because Trix is submitting the image as an image tag wrapped around with an anchor tag with an href to the image however, the href is using a relative path which would explain the broken link. ```
colorful_helmet.png 165.18 KB
``` Is there a way to extract the image url if I am using active storage and s3 to store the images?

nnand85 said about 4 years ago on WYSIWYG Editor with Trix :
Hi,

Is there a tutorial on setting up Trix image uploads with Heroku? I've got Trix setup on local and pushed to Heroku and noticed that each time I pushed new code to heroku, the image links were all broken. Then after reading into this more, I realized this also happens when the Heroku dyno is restarted. I am currently not sure what to do with Rails 6, Active Storage and S3 (or a different one).

Thanks,

Nav

David Kimura PRO said about 4 years ago on WYSIWYG Editor with Trix :
  That would be expected behavior as the dyno is like a docker container without any persistent volume claims. You should offload any uploads which needs to persist between restarts or deploys to a service like AWS S3 or Backblaze B2. 

nnand85 said about 4 years ago on WYSIWYG Editor with Trix :
  -- do you know of any resources that walks through that setup?

Flip437 said over 3 years ago on WYSIWYG Editor with Trix :
Hello,

My config
- Rails 6 + sprockets.
- Active storage OK
- Trix editor ok with <%= f.rich_text_area :content %>
- Trix editor KO with    <%= f.trix_editor :content %>

Can someone tel me why I can't use f.trix_editor ??

David Kimura PRO said over 3 years ago on WYSIWYG Editor with Trix :
  It sounds like you're using Action Text which supersedes this tutorial. 

Login to Comment