4

I've installed the ckeditor gem and everything is working except for my custom toolbar definition. I'm working in the development environment. Checking the inspector in Chrome I see that my custom.js file is being requested BEFORE the ckeditor gem's config and as a result is probably being overwritten. I think I found a crappy solution here, but I was wondering if anyone else has found a better solution.

Here is a sample of my current application.js config:

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

I have the config.js file nested in assets-javascripts-ckeditor. I am also using the parameter :ckeditor => {:uiColor => "#D6A11A", :toolbar => "admin"} in my cktext_area form method. I know it is being read because the uiColor changes accordingly.

4

1 に答える 1

2

私はこれを本当に理解したことがありません。ckeditor-rails gem の最新バージョンにアップグレードし、すべてのインストール手順を文字どおりに実行することで、この問題は修正されました。また、ckeditor で使用されるカスタム .js 構成ファイルがある場合は、それらを application.rb のプリコンパイル アセット パスに追加してください。

于 2014-02-13T00:53:45.940 に答える