I'm trying to implement ActionText on my app that's been upgraded to Rails 6.0.1.
I ran rails action_text:install
and migrated, then added has_rich_text :content
to my comment
model. Then in the form I've switched f.text_area :content
to f.rich_text_area :content
.
However the editor that appears looks like this and can't attach files. What am I doing wrong?
I had a similar problem after upgrading from Rails 5.2 to Rails 6.0. Please add the following line in your application.scss:
@import 'trix/dist/trix.css'
@import 'actiontext'
checkout these blogs for more details:
https://blog.rubynetti.it/i/how-to-add-action-text-in-rails-6:
https://blog.francium.tech/action-text-in-rails-6-a-brief-intro-dd33fb412eb5
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With