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

app/assets/javascripts/ckeditor/config.js #1

Closed macfanatic closed 12 years ago

macfanatic commented 12 years ago

The config JS file doesn't seem to be read from inside the application itself, it just pulls the version that inside the gem itself.

For example, http://localhost:3000/assets/ckeditor/config.js shows the contents of bundled JS, no matter what I try as contents inside my app.

Tried without the coffee script as well, to no avail.

Any thoughts? I'm using a Rails 3.1.3 application.

tsechingho commented 12 years ago

do you clear the cache of browser? Maybe it helps.

I have app/assets/javascripts/ckeditor/config.js.coffee

CKEDITOR.editorConfig = (config) ->
  config.language = "en"
  config.width = "850"
  config.height = "600"
  true

If I change config.height = "600" to config.height = "300", it works as expected with in my project (rails 3.1.3).

macfanatic commented 12 years ago

Thanks for the tip - appears I never could get it working in development, but in production it overrode the include config.js file just fine. Not sure on this one!

berga commented 11 years ago

hi,

I solved using:

config.serve_static_assets = false

in development.rb

regards Marco

mltsy commented 11 years ago

This little hiccup would be a great thing to add to the README under the part that specifies how to use a custom config.js - I had the same problem and couldn't figure it out for a long while, until I looked here in the closed issues! :)

tsechingho commented 11 years ago

I think the wiki pages should be good place to put these. https://github.com/tsechingho/ckeditor-rails/wiki

mltsy commented 11 years ago

Ah! Excellent point! I'll add a note to the wiki. However, I didn't even notice there was a wiki until now. Perhaps a link to the wiki from the README file would be helpful? "For more information on configuration and customization, see the wiki: https://github.com/tsechingho/ckeditor-rails/wiki"