Restore deleted CKEditor config

Just so we can navigate throught git history faster:

* Introduced in 345e34d to avoid precompiling all CKEditor assets.
* Modified in 54c82a5 to avoid compiling assets during tests.
* Overwritten by `rails g ckeditor:install` in c0d6c0b.
This commit is contained in:
Javi Martín
2018-09-07 13:52:35 +02:00
parent 27155dd7d7
commit 71ce7acc10

View File

@@ -1,4 +1,3 @@
# Use this hook to configure ckeditor
Ckeditor.setup do |config|
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
@@ -6,55 +5,8 @@ Ckeditor.setup do |config|
# available as additional gems.
require 'ckeditor/orm/active_record'
# Allowed image file types for upload.
# Set to nil or [] (empty array) for all file types
# By default: %w(jpg jpeg png gif tiff)
# config.image_file_types = %w(jpg jpeg png gif tiff)
# Allowed flash file types for upload.
# Set to nil or [] (empty array) for all file types
# By default: %w(jpg jpeg png gif tiff)
# config.flash_file_types = %w(swf)
# Allowed attachment file types for upload.
# Set to nil or [] (empty array) for all file types
# By default: %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
# config.attachment_file_types = %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
# Setup authorization to be run as a before filter
# By default: there is no authorization.
# config.authorize_with :cancan
# Override parent controller CKEditor inherits from
# By default: 'ApplicationController'
# config.parent_controller = 'MyController'
# Asset model classes
# config.picture_model { Ckeditor::Picture }
# config.attachment_file_model { Ckeditor::AttachmentFile }
# Paginate assets
# By default: 24
# config.default_per_page = 24
# Customize ckeditor assets path
# By default: nil
# config.asset_path = 'http://www.example.com/assets/ckeditor/'
# To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
# By default: nil (no limit)
# config.assets_languages = ['en', 'uk']
# config.assets_plugins = ['image', 'smiley']
# CKEditor CDN
# More info here http://cdn.ckeditor.com/
# By default: nil (CDN disabled)
# config.cdn_url = '//cdn.ckeditor.com/4.7.1/standard/ckeditor.js'
# JS config url
# Used when CKEditor CDN enabled
# By default: "ckeditor/config.js"
# config.js_config_url = 'ckeditor/config.js'
config.assets_languages = Rails.application.config.i18n.available_locales.map{|l| l.to_s.downcase}
config.assets_plugins = %w[copyformatting tableselection scayt wsc]
end
Ckeditor::PicturesController.send(:load_and_authorize_resource)