简体   繁体   中英

Issue with summernote-rails and ActiveAdmin: all colors in color picker are grey

Color picker in summer note

Hi,

Recently I implemented the gem summernote-rails in my app, and I am using it in ActiveAdmin to edit the html_content of a model email . Everything is functioning minus one thing: the colors in the colors picker views are all grey, but the colors are not grey. Here I let you my files related with scss and coffee-script:

In app/assets/javascripts/active_admin.coffee

#= require active_admin/base
#= require bootstrap
#= require summernote

$ -> 
  $(".summernote").summernote()     

In app/assets/javascripts/active_admin.scss

// Active Admin's got SASS!
@import "active_admin/mixins";  
@import "active_admin/base"; 
@import 'bootstrap';
@import 'font-awesome';
@import 'variables/colors';
@import 'summernote';
@import 'email';

In app/admin/email.rb

ActiveAdmin.register Email do
  permit_params :name, :title, :html_content

  form do |f|
    f.inputs 'Blog Post' do
    f.input :name
    f.input :title
    f.input :html_content, input_html: { class: 'summernote' }
  end
  f.actions
  end
end

I finaly solve it with a colleague, the issue came from ActiveAdmin which overwrite background-image . So I proceed like that:

In app/assets/stylesheets/email.scss

.note-color-btn { 
  background-image: none; 
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM