So I updated Ckeditor to 4.2. After I did this, Ckeditor no longer appears in production. Instead, I get the following error in the console:
Uncaught TypeError: CKEDITOR.style.customHandlers[e.type] is not a constructor
I've consulted a few sources, including this post, which claimed the issue was in precompilation. I've edited my application.rb to include Ckeditor in precompilation, but it still doesn't work.
require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module DeployTest
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.assets.precompile += Ckeditor.assets
config.assets.precompile += %w( ckeditor/* )
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
config.active_record.default_timezone = :local
config.time_zone = 'Eastern Time (US & Canada)'
end
end
Weirdly enough, when I turn config.assets.debug = true
, Ckeditor starts working again, but my CSS turns off.
Why does config.assets.debug
work? Why does it turn off my CSS? And how can I get a permanent solution for ckeditor?