Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading to ActionText - editor not working/appearing properly

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?

enter image description here

like image 980
DavidM Avatar asked Dec 13 '22 10:12

DavidM


1 Answers

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.

like image 185
Enow B. Mbi Avatar answered Feb 23 '23 04:02

Enow B. Mbi