tsechingho / ckeditor-rails

Integrate CKEditor javascript library with Rails asset pipeline
https://github.com/tsechingho/ckeditor-rails
MIT License
213 stars 132 forks source link

Default config overwrites custom one #32

Open Aetherus opened 11 years ago

Aetherus commented 11 years ago

I created my app/assets/javascripts/config.js.coffee like this:

CKEDITOR.editorConfig = (config) -> config.docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'

When I start up my server in development env and access the page, I noticed that the default ckeditor/config.js always executes AFTER my custom one, and my config gets ignored.

Here is my application.js:

//= require jquery //= require jquery_ujs //= require ckeditor-jquery //= require ckeditor/config //= require_tree .

yorkxin commented 10 years ago

Having this issue on Rails 4 too.

yannp commented 10 years ago

I'm having this issue too, I'm using Rails 4. Any idea on how to solve this?

tsechingho commented 10 years ago

try to put config.js.coffee under app/assets/javascripts/ckeditor/ folder. no need to put //= require ckeditor/config in application.js

vladimir-e commented 10 years ago

I had same issue, but restarting the server helped. I know sounds dumb... and I restarted server when just installed the gem. I guess it's related to autoloading of ckeditor/config thing.

ledowong commented 10 years ago

oh, yea need restart server after update that file.... thx for the tips

subhash-shah commented 9 years ago

I am facing this problem in Rails 4 on heroku. It works fine locally.

The config.js file is at app/assets/javascripts/ckeditor/config.js.

Any suggestions?

subhash-shah commented 9 years ago

Adding it to production.rb fixed it on heroku.

config.assets.precompile += %w(ckeditor/config.js)