ckeditor.rb 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Use this hook to configure ckeditor
  2. Ckeditor.setup do |config|
  3. # ==> ORM configuration
  4. # Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
  5. # :mongoid (bson_ext recommended) by default. Other ORMs may be
  6. # available as additional gems.
  7. require "ckeditor/orm/active_record"
  8. # Allowed image file types for upload.
  9. # Set to nil or [] (empty array) for all file types
  10. # By default: %w(jpg jpeg png gif tiff)
  11. # config.image_file_types = %w(jpg jpeg png gif tiff)
  12. # Allowed flash file types for upload.
  13. # Set to nil or [] (empty array) for all file types
  14. # By default: %w(jpg jpeg png gif tiff)
  15. # config.flash_file_types = %w(swf)
  16. # Allowed attachment file types for upload.
  17. # Set to nil or [] (empty array) for all file types
  18. # By default: %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
  19. # config.attachment_file_types = %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
  20. # Setup authorization to be run as a before filter
  21. # By default: there is no authorization.
  22. # config.authorize_with :cancan
  23. # Override parent controller CKEditor inherits from
  24. # By default: 'ApplicationController'
  25. # config.parent_controller = 'MyController'
  26. # Asset model classes
  27. # config.picture_model { Ckeditor::Picture }
  28. # config.attachment_file_model { Ckeditor::AttachmentFile }
  29. # Paginate assets
  30. # By default: 24
  31. # config.default_per_page = 24
  32. # Customize ckeditor assets path
  33. # By default: nil
  34. # config.asset_path = "http://www.example.com/assets/ckeditor/"
  35. # To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
  36. # By default: nil (no limit)
  37. # config.assets_languages = ['en', 'uk']
  38. # config.assets_plugins = ['image', 'smiley']
  39. # CKEditor CDN
  40. # More info here http://cdn.ckeditor.com/
  41. # By default: nil (CDN disabled)
  42. # config.cdn_url = "//cdn.ckeditor.com/4.5.6/standard/ckeditor.js"
  43. # JS config url
  44. # Used when CKEditor CDN enabled
  45. # By default: "/assets/ckeditor/config.js"
  46. # config.js_config_url = "/assets/ckeditor/config.js"
  47. end