2
所以我將Ckeditor更新爲4.2。在我做完這件事之後,Ckeditor不再出現在製作中。相反,我在控制檯中出現以下錯誤:Ckeditor在生產中不顯示Rails
Uncaught TypeError: CKEDITOR.style.customHandlers[e.type] is not a constructor
我請教了幾個來源,包括這post,聲稱該問題是在預編譯。我編輯了我的application.rb,在預編譯中包含了Ckeditor,但它仍然不起作用。
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
古怪的是,當我轉config.assets.debug = true
,CKEDITOR再次開始工作,但我的CSS關閉。
爲什麼config.assets.debug
有效?爲什麼它會關閉我的CSS?我怎樣才能獲得ckeditor的永久解決方案?