ActiveAdmin Ace Editor
An Active Admin plugin to use Ace Editor
Install
- Update your Gemfile:
gem 'activeadmin_ace_editor'
(and execute bundle) - Add at the end of your ActiveAdmin javascripts (app/assets/javascripts/active_admin.js):
#= require activeadmin/ace_editor_input
#= require ace-src-min-noconflict/ace
- Use the input with
as: :ace_editor
in Active Admin model conf
Why 2 separated scripts? In this way you can include a different version of ace editor if you like.
Options
data-options-mode: sets the language for the editor.
Examples
# ActiveAdmin article form conf:
form do |f|
f.inputs 'Article' do
f.input :title
f.input :description, as: :ace_editor, input_html: {data: {"options-mode": "json"}}
f.input :published
end
f.actions
end
Based on
Based on the Active Admin Quill Editor