1

ActiveAdmin Trumbowyg is not working properly. I have added upload option using it and uploaded file as per code give here.

It successfuly uploads the file, but it is not inserted inside text area.

form do |f |
  f.inputs do
    f.input: title
  f.input: body, as:: trumbowyg,
  input_html: {
    data: {
      options: {
        btns: [
          ['removeformat'],
          ['upload'],
          ['insertImage'],
          ['viewHTML']
        ],
        plugins: {
          upload: {
            serverPath: uploader_image_path(resource.id),
            fileFieldName: 'file_upload'
          }
        }
      }
    }
  }
f.input: banner_image, as:: file
end
f.actions
end

Any solution?

Demo site for reference.
Use it with plugin option given below the editor.

Community
  • 1
  • 1
adi
  • 25
  • 3

0 Answers0