railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.89k stars 2.26k forks source link

Action Text attachment button has no icon #3251

Closed exvayn closed 2 years ago

exvayn commented 4 years ago

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

exvayn commented 4 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' }

nicholalexander commented 4 years ago

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.

vnguyen13 commented 4 years ago

@exvayn @nicholalexander How did you incorporate action text to work with rails_admin?

tosbourn commented 3 years ago

How did you incorporate action text to work with rails_admin?

@vnguyen13 there is a wiki page explaining how to get ActionText working

xmarco commented 2 years ago

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
tosbourn commented 2 years ago

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