Closed exvayn closed 2 years ago
I fixed this by loading own css and js:
js_location { bindings[:view].asset_pack_path 'actiontext.js' }
css_location { bindings[:view].asset_path 'application.scss' }
Yes, this worked, thank you! Maybe we could add this to the wiki? https://github.com/sferik/rails_admin/wiki/ActionText - I wasn't sure if I should just edit the wiki or no.
@exvayn @nicholalexander How did you incorporate action text to work with rails_admin?
How did you incorporate action text to work with rails_admin?
@vnguyen13 there is a wiki page explaining how to get ActionText working
Since Rails 7 removed webpacker
, I add the following lines but get no luck.
RailsAdmin.config do |config|
config.model 'Article' do
field :content do
css_location { bindings[:view].asset_path 'actiontext.css' }
js_location { bindings[:view].asset_path 'actiontext.js' }
end
end
end
I'm having the exact same issue with Rails 7 at the moment.
Now the code @xmarco posted will return the raw contents of actiontext.js
and not the compiled contents.
Are there any known work-arounds to point ActionText towards your own version when you don't use webacker?
Related to #3449
Issue: Action Text attachment button has no icon
Because the old version of library is used (1.1.1): https://github.com/sferik/rails_admin/blob/v2.0.1/lib/rails_admin/config/fields/types/action_text.rb
please update version of trix library