Sha256: 4b905add1a49f4d322dee6cfcf251564604233e350a39e03ee065119c1e95137

Contents?: true

Size: 775 Bytes

Versions: 6

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

require 'rails/engine'
require_relative 'presets'

module CKEditor5::Rails
  class Engine < ::Rails::Engine
    config.ckeditor5 = ActiveSupport::OrderedOptions.new

    # Specifies which CDN should be used to load CKEditor 5 using the ckeditor5_assets helper.
    # It is possible to use the following CDNs:
    # - :unpkg
    # - :jsdelivr (default)
    config.ckeditor5.default_cdn = :jsdelivr

    # Specifies configuration of editors generated by gem.
    config.ckeditor5.presets = PresetsManager.new

    initializer 'helper' do
      ActiveSupport.on_load(:action_view) do
        include Helpers
      end
    end

    def self.base
      config.ckeditor5
    end

    def self.configure
      yield config.ckeditor5
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ckeditor5-1.0.5 lib/ckeditor5/rails/engine.rb
ckeditor5-1.0.4 lib/ckeditor5/rails/engine.rb
ckeditor5-1.0.3 lib/ckeditor5/rails/engine.rb
ckeditor5-1.0.2 lib/ckeditor5/rails/engine.rb
ckeditor5-1.0.1 lib/ckeditor5/rails/engine.rb
ckeditor5-1.0.0 lib/ckeditor5/rails/engine.rb