i'm using rails 6.0.0 and ruby 2.6.0, I want to know what's the best way to use ActionText in ActiveAdmin, should I have to use render?
I used this f.rich_text_area :content
inside ActiveAdmin but it didn't work for me so I added <trix-editor>
tag inside a custom form following this Form Partial Tricks
but also this didn't work so I ended up using this gem ActiveAdmin Quill Editor it was easy to setup and worked perfectly
Add this to your Gemfile gem 'activeadmin_quill_editor'
in your app/assets/stylesheets/active_admin.scss
file, add this:
@import 'activeadmin/quill_editor_input';
app/assets/javascripts/active_admin.js
file, add this://= require activeadmin/quill_editor/quill
//= require activeadmin/quill_editor_input
# ActiveAdmin article form conf:
form do |f|
f.inputs 'Article' do
f.input :title
f.input :description, as: :quill_editor
f.input :published
end
f.actions
end
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