Rails gem ckeditor loads custom config.js before its own config

I installed the ckeditor gem and everything works except for my custom toolbar definition. I am working in a development environment. Inspecting the inspector in Chrome I can see that my custom.js file is being requested before the gem ckeditor config and as a result is probably overwritten. I think I found a crappy solution here , but I was wondering if anyone else found a better solution.

Here is an example of my current application.js configuration:

//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require ckeditor/init
//= require_tree ./ckeditor
//= require_directory .

      

I have a config.js file nested under assets-javascripts-ckeditor. I am also using a parameter :ckeditor => {:uiColor => "#D6A11A", :toolbar => "admin"}

in my cktext_area form method. I know it is being read because the uiColor changes accordingly.

+3


source to share


1 answer


I never thought about it. An update to this latest version of ckeditor-rails and the subsequent installation instructions attached to the letter fixed this issue. Also, if you have any custom .js config files used by ckeditor, make sure you add them to your precompiled resource paths in application.rb.



+2


source







All Articles