trix icon indicating copy to clipboard operation
trix copied to clipboard

How do I use Trix in rails 7 with cssbundling ?

Open mices opened this issue 3 years ago • 3 comments

How do I use trix in rails 7 with cssbundling? I know from Gemfile.lock that my new rails 7 app already has actiontext and activestorage installed The installer didn't create an application.scss file only application.bootstrap.css Previously in rails 6 I imported actiontext in application.css and then actiontext.css contained the @import 'trix/dist/trix'

mices avatar Oct 16 '22 17:10 mices

same with propshaft and dartsass-rails. trix has no styles

asecondwill avatar Jan 12 '24 15:01 asecondwill

Have you tried adding "trix" and "actiontext" to the stylesheet_link_tag call in your app/views/layouts/application.html.erb file?

stylesheet_link_tag "trix", "actiontext"

seanpdoyle avatar Jan 12 '24 15:01 seanpdoyle

no, but i did try this, which fixed it. and now i feel foolish.

@import "trix";

asecondwill avatar Jan 16 '24 10:01 asecondwill