O
O
Ord EO2019-05-09 11:13:45
Ruby on Rails
Ord EO, 2019-05-09 11:13:45

How to attach a WYSIWYG editor to Active Admin 2.0?

The project uses the Ruby on Rails gem for the Active Admin 2.0 admin panel.
It is necessary to fasten a simple WYSIWYG editor for the form, tell me how this can be done?
Something like on the skin below, but with less functionality.
5cd3e1367b0e8092576028.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2019-05-09
@OrdeO

Take, say, TinyMCE and integrate it.

ActiveAdmin.register Page do

  permit_params :body, :name

  index do
    column :name
    column :created_at
    column :updated_at
  
    actions
  end

  form do |f|
    f.inputs "Page Details" do
      f.input :name
      f.input :body, as: :text, input_html: { class: "tinymce" }
    end
    f.actions
  end

end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question